Automatic login and alternate default domain name

K

Kapil

Hi All,

I am facing a strange problem.
My setup is as follows:
1. Embedded XP with SP2
2. Automatic login is enabled
3. Custom shell
4. EWF RAM

System works as follows:
System has a power controller board and custom shell application
communicates with it.
Power controller board has external jumpers. Depending on the jumper
settings, custom shell application changes the computer name e.g.,
PC1, PC2 etc.
Operating system image has PC1 as default computer name so the system
works fine when jumper settings are set to PC1.

Problem:
When jumper settings are set to PC2, custom shell application changes
the computer name to PC2 but alternate default domain name
(AltDefaultDomainName) located at
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
\Winlogon] remains as PC1.
If EWF is disabled then at the next bootup cycle the
AltDefaultDomainName changes to PC2.
If EWF is enabled then AltDefaultDomainName does not change unless we
commit the changes.
When regmon is run at the bootup, logs show that AltDefaultDomainName
is updated by Winlogon.exe
I do not think we have any control over execution sequence of
winlogon.exe (i.e., force winlogon.exe to run after custom shell
application is started).
We do not want to make any changes at the application level
(preferably).

Is there any way to tell windows to ignore AltDefaultDomainName key ?
Because of the mismatch in the hostname and AltDefaultDomainName,
network shares cannot be accessed.
Suppose there is share on PC2 viz; \\PC2\Shared_Folder with permission
as "Full Control" to all users (Everyone). In this case the current
user on PC2 cannot access the shared folder \\PC2\Shared_Folder.
Windows thinks that current user is from the PC1 as
AltDefaultDomainName is PC1. But if I access the share folder with IP
address i.e., \\1.1.1.2\\Shared_Folder it works perfectly fine.

Please advise so that I can either change the AltDefaultDomainName or
completely ignore it during shared folder access.
(Please note that manual change of AltDefaultDomainName does not make
any difference.)

All inputs and suggestions are welcome.

Thanks in advance
Kapil
 
K

KM

Kapil,

How precisely do you change the computer name in software when the jumper is switched? API, registry, etc.?
What do you commit as the change in EWF overlay after the computer name change before the reboot?
 
K

Kapil

Kapil,

How precisely do you change the computer name in software when the jumper is switched? API, registry, etc.?
What do you commit as the change in EWF overlay after the computer name change before the reboot?

--
=========
Regards,
          KM


I am facing a strange problem.
My setup is as follows:
1. Embedded XP with SP2
2. Automatic login is enabled
3. Custom shell
4. EWF RAM
System works as follows:
System has a power controller board and custom shell application
communicates with it.
Power controller board has external jumpers. Depending on the jumper
settings, custom shell application changes the computer name e.g.,
PC1, PC2 etc.
Operating system image has PC1 as default computer name so the system
works fine when jumper settings are set to PC1.
Problem:
When jumper settings are set to PC2, custom shell application changes
the computer name to PC2 but alternate default domain name
(AltDefaultDomainName) located at
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
\Winlogon] remains as PC1.
If EWF is disabled then at the next bootup cycle the
AltDefaultDomainName changes to PC2.
If EWF is enabled then AltDefaultDomainName does not change unless we
commit the changes.
When regmon is run at the bootup, logs show that AltDefaultDomainName
is updated by Winlogon.exe
I do not think we have any control over execution sequence of
winlogon.exe (i.e., force winlogon.exe to run after custom shell
application is started).
We do not want to make any changes at the application level
(preferably).
Is there any way to tell windows to ignore AltDefaultDomainName key ?
Because of the mismatch in the hostname and AltDefaultDomainName,
network shares cannot be accessed.
Suppose there is share on PC2 viz; \\PC2\Shared_Folder with permission
as "Full Control" to all users (Everyone). In this case the current
user on PC2 cannot access the shared folder \\PC2\Shared_Folder.
Windows thinks that current user is from the PC1 as
AltDefaultDomainName is PC1. But if I access the share folder with IP
address i.e., \\1.1.1.2\\Shared_Folder it works perfectly fine.
Please advise so that I can either change the AltDefaultDomainName or
completely ignore it during shared folder access.
(Please note that manual change of AltDefaultDomainName does not make
any difference.)
All inputs and suggestions are welcome.
Thanks in advance
Kapil- Hide quoted text -

- Show quoted text -

Thanks for reply.

Once the jumpers are switched, system has to be restarted so as to get
new hostname/computername.
I am only responsible for Image and some part of software so I exactly
do not know how the name is changed.
But I checked all the locations for hostname/computer name i.e.,
1. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName
\ActiveComputerName
2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName
\ComputerName
3. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip
\Parameters ( hostname value )
Even in System properties it shows me the right Hostname/ComputerName.
We do not commit the changes once hostname is changed as we want all
the machines swappable.
PC1 can be PC2 and vice a versa.

The main problem is, I can access the shared folder with ipaddress but
not with hostname/computername.
e.g.; \\1.1.1.2\\Shared_Folder can be accessed but \\PC2\Shared_Folder
cannot be accessed, where PC2 = 1.1.1.2.
Winlogon.exe sets the AltDefaultDomainName to PC1 all the time before
custom shell application changes the hostname.
Is there anyway to force operating system to ignore
AltDefaultDomainName value atleast for shared drives :)) or force
Winlogon.exe so it will not update AltDefaultDomainName ?

-Kapil
 
K

KM

Kapil,

All you need to change is the following reg.values:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerN­ame],"ComputerName"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters],"Ho­stname".

And then restart the PC.

Looks like you got the change correctly. However, I couldn't understand why you do NOT commit the change. How do you assume the name
will change on next boot if it wasn't commited? Or am I missing something?
I doubt AltDefaultDomainName has anything to do with your issue. It is not used in the scenerio you described.
Did you check if after the reboot the "server" service is up and running on the target machine? Also, just in case, make sure
Windows Firewall is off.

--
=========
Regards,
KM

- Show quoted text -

Thanks for reply.

Once the jumpers are switched, system has to be restarted so as to get
new hostname/computername.
I am only responsible for Image and some part of software so I exactly
do not know how the name is changed.
But I checked all the locations for hostname/computer name i.e.,
1. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName
\ActiveComputerName
2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName
\ComputerName
3. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip
\Parameters ( hostname value )
Even in System properties it shows me the right Hostname/ComputerName.
We do not commit the changes once hostname is changed as we want all
the machines swappable.
PC1 can be PC2 and vice a versa.

The main problem is, I can access the shared folder with ipaddress but
not with hostname/computername.
e.g.; \\1.1.1.2\\Shared_Folder can be accessed but \\PC2\Shared_Folder
cannot be accessed, where PC2 = 1.1.1.2.
Winlogon.exe sets the AltDefaultDomainName to PC1 all the time before
custom shell application changes the hostname.
Is there anyway to force operating system to ignore
AltDefaultDomainName value atleast for shared drives :)) or force
Winlogon.exe so it will not update AltDefaultDomainName ?

-Kapil
 
K

Kapil

Kapil,

All you need to change is the following reg.values:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerN­­ame],"ComputerName"
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters],"Ho­­stname".

And then restart the PC.

Looks like you got the change correctly. However, I couldn't understand why you do NOT commit the change. How do you assume the name
will change on next boot if it wasn't commited? Or am I missing something?
I doubt AltDefaultDomainName has anything to do with your issue. It is notused in the scenerio you described.
Did you check if after the reboot the "server" service is up and running on the target machine? Also, just in case, make sure
Windows Firewall is off.

--
=========
Regards,
          KM
- Show quoted text -

Thanks for reply.

Once the jumpers are switched, system has to be restarted so as to get
new hostname/computername.
I am only responsible for Image and some part of software so I exactly
do not know how the name is changed.
But I checked all the locations for hostname/computer name i.e.,
1. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName
\ActiveComputerName
2. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName
\ComputerName
3. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip
\Parameters ( hostname value )
Even in System properties it shows me the right Hostname/ComputerName.
We do not commit the changes once hostname is changed as we want all
the machines swappable.
PC1 can be PC2 and vice a versa.

The main problem is, I can access the shared folder with ipaddress but
not with hostname/computername.
e.g.; \\1.1.1.2\\Shared_Folder can be accessed but \\PC2\Shared_Folder
cannot be accessed, where PC2 = 1.1.1.2.
Winlogon.exe sets the AltDefaultDomainName to PC1 all the time before
custom shell application changes the hostname.
Is there anyway to force operating system to ignore
AltDefaultDomainName value atleast for shared drives :)) or force
Winlogon.exe so it will not update AltDefaultDomainName ?

-Kapil

Thanks for the reply.

Each time system is restarted, it looks at the jumper settings and
then assigns the hostname.
As PCs are swappable i..e, PC1 can be PC2 and vice a versa, we do not
want to commit the changes as it will need an extra restart each time.
When I try to access the Shared_Folder by hostname i.e., \
\PC2\Shared_Folder, a popup dialog appears asking for user
credentials. The description on the dialog differs as the dialog
caption says "Connect to PC1" where actual text on the dialog says
"Connect to PC2".
One more thing to share, If I remove the AltDefaultDomainName from
registry before enabling the EWF, I do not see this issue anymore.
So I think AltDefaultDomainName causes some issues.
The "server" service is running on the machine and Windows Firewall is
also off.

Please let me know if you need any further information.

-Kapil
 
K

KM

Kapil,

AltDefaultDomainName is undocumented value that gets written to the registry by MS Gina (part of WinLogon). Frankly, I never heard
of any use of that value by any other component in the system.

Anyway, for the computer name change to be properly applied PC must be restarted (kernel and TCP/IP stack will read the new comp
name early at the boot) with the change fully committed to the disk (registry).
Are you saying you not committing the change, restarting PC and somewhere in the boot sequence reading the jumper settings and
setting (changing) the computer name again? Do you expect it to work properly with the computer name changed on fly? Then it will
not. PC must be restarted with the new computer name committed in the registry.
Only exception would be (and I've seen such implementation on XPe) is when your own kernel driver (or better yet, loader driver)
will read the new comp name (from the jumper settings, for instance) and change it in the registry before the other parts of the
kernel load and before the TCP/IP stack is loaded.

--
=========
Regards,
KM

Thanks for the reply.

Each time system is restarted, it looks at the jumper settings and
then assigns the hostname.
As PCs are swappable i..e, PC1 can be PC2 and vice a versa, we do not
want to commit the changes as it will need an extra restart each time.
When I try to access the Shared_Folder by hostname i.e., \
\PC2\Shared_Folder, a popup dialog appears asking for user
credentials. The description on the dialog differs as the dialog
caption says "Connect to PC1" where actual text on the dialog says
"Connect to PC2".
One more thing to share, If I remove the AltDefaultDomainName from
registry before enabling the EWF, I do not see this issue anymore.
So I think AltDefaultDomainName causes some issues.
The "server" service is running on the machine and Windows Firewall is
also off.

Please let me know if you need any further information.

-Kapil
 
K

Kapil

Kapil,

AltDefaultDomainName is undocumented value that gets written to the registry by MS Gina (part of WinLogon). Frankly, I never heard
of any use of that value by any other component in the system.

Anyway, for the computer name change to be properly applied PC must be restarted (kernel and TCP/IP stack will read the new comp
name early at the boot) with the change fully committed to the disk (registry).
Are you saying you not committing the change, restarting PC and somewhere in the boot sequence reading the jumper settings and
setting (changing) the computer name again? Do you expect it to work properly with the computer name changed on fly? Then it will
not. PC must be restarted with the new computer name committed in the registry.
Only exception would be (and I've seen such implementation on XPe) is whenyour own kernel driver (or better yet, loader driver)
will read the new comp name (from the jumper settings, for instance) and change it in the registry before the other parts of the
kernel load and before the TCP/IP stack is loaded.

--
=========
Regards,
          KM



Thanks for the reply.

Each time system is restarted, it looks at the jumper settings and
then assigns the hostname.
As PCs are swappable i..e, PC1 can be PC2 and vice a versa, we do not
want to commit the changes as it will need an extra restart each time.
When I try to access the Shared_Folder by hostname i.e., \
\PC2\Shared_Folder, a popup dialog appears asking for user
credentials. The description on the dialog differs as the dialog
caption says "Connect to PC1" where actual text on the dialog says
"Connect to PC2".
One more thing to share, If I remove the AltDefaultDomainName from
registry before enabling the EWF, I do not see this issue anymore.
So I think AltDefaultDomainName causes some issues.
The "server" service is running on the machine and Windows Firewall is
also off.

Please let me know if you need any further information.

-Kapil

Thanks KM.
Application wise the strategy worked for us for few years.
Its just now when we migrated from SP1=>SP2, we saw this problem very
often.
As you already mentioned, Kernel driver and TCP/IP stack will be
initialized using the "commited" name,
it would make sense to go through one more restart cycle and save the
hostname changes to the disk.

Thanks again.
-Kapil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top