At a client with 100+ workstations, all running a simple logon script, two workstations are experiencing a strange problem. For testing and as an example, a simplified logon script is used:

net use T: \\server\public
set > C:\Temp\LoginEnv.txt

This works on all but the two workstations, mapping the drive and filling the text file with the environment settings. On the two problematic workstations, the NET USE command returns error 10 - The environment is invalid, and the text file is empty. To troubleshoot further, I added a command to return a list of specific DNS SRV records, which should list all of the AD domain controllers in the domain. Again, this list is empty on the faulty systems.

Oddly, after logging in, if we open a command prompt and run the same commands, everything works. The problem only happens during logon.

I'd appreciate any ideas as to the cause of this behaviour before we resort to simply re-imaging these systems.

Thanks!

Glenn

Are you running the login script with in GPO?

No - standard login script via user profile.

Hmmm. Anything different with regard to permissions on that target directory?

The example I gave earlier shows one mapping just to illustrate the issue. There are actually 6 mappings and all return the same error, regardless of user account used to log in.. thus, not permission, share, or user related. Doesn't seem to be network, either, as the script is running from the domain controller.

What bothers me is that after the logon completes and the desktop displays, you can open a command prompt and manually run the NET USE commands or display the environment values without error. It almost seems like a timing issue, as if the registry is unavailable during logon. Odd, still, because it's during logon even well after the system booted.

We tried using a fresh user profile; verified network configuration; disabled hibernate & rebooted to eliminate a corrupt HIB file; validated that the HOSTS and LMHOSTS files aren't in use (no custom settings) and DNS is correct; and verified that the script files are in ANSI format. BTW - group policy defines that the workstation will wait for the network to be ready and that login scripts run synchronously, so the script wont start until the workstation's network is ready, and the desktop won't display until the script completes.

We've replaced the systems with spares and are going to re-image the affected systems soon as its clearly a client workstation issue. I'm more concerned if anyone has seen this so we can figure out what might have caused it to either avoid or quickly repair it in the future.

Thanks,

Glenn

Give it a try by running the logon script within at least a local policy on that computer (gpedit.msc). With regard to permissions, the thought was around how scripts will run under different credentials depending on how they are deployed (system account vs user account).

Are these two systems also running XP?

hi guys, what can i do when logging on, i do using my credentials but am immediately logging off. what could be the problem?

Fred.

Hello Fred,

It appears that you are a new member. As a courtesy, you should not hijak other people's threads, especially when your question is not related to the thread.

In any event, with regard to your problem, more information is needed. Are you logging on with a local or domain account. Is there a message on the screen before it logs you off?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.