Discussion Locked

Login Scripts

0 helpful
22 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a NT server and win 98 m/c as clients. Since each user has to have a different drive mapped to his login, I have written login scripts for each user (using commands net use f: \\servername\sharename) these have been stored as batch files in the winnt\system32\repl\import\scripts folder which has been shared as netlogon.
i find that sometimes the logon script does not run when loggin into the network. Shutting down and restarting does work sometimes. And for some users it just does not run.
The name of the bat file has been mentioned in the 'user properties\profile\logon script name'

Why does this happen ?

22 replies

by benwagg

Things I would check:

1. For the users that the logon script never runs, re-check the details of their network properties to be sure that the Win9x system is a member of the domain _and_ that the domain name is entered in the "Client for Microsoft Networks" tab, with "Log on to a Domain" checked.

2. All users understand they cannot log onto the network by pressing the ESC button (trust me - I'm still working on this with some users...).

3. Make sure there is enough "environment" available on the client systems for the necessary variables to be added by the script(s). My logon scripts add variables, so on my Win9x clients I have had to increase the environment by adding this line to config.sys: shell=c:\command.com /p /e:2048

4.Be sure the client does not have applications starting from the Startup folder that might be interfering with logon.

5. Be sure the client does not already have that drive letter mapped or assigned prior to the logon script. I unmap all drives inmy logon script to be sure I can map the ones they are supposed to have.
IE, I put this line:
net use /delete h:
Before this line:
net use h: \\server\userhome\Joe /persistent:no

6: Lastly, take your laptop over and plug into their RJ45 socket... got net? I had one user who plagued me with support calls until I realized some desk-mover must have jammed his desk against the wall hard enough to damage the socket with the network cable still in. It looked fine, but the internal connections were loose.

by achat

ben,
Thanx a lot for the detailed check list. Points 1,2 & 6 are not the problem since the script does execute intermittently.
I did add the line to the config.sys but this dint help. Also there are no other applns onthat m/c which load at start up.

I am still at square 1. Any more ideas.

by fenaikh

Hi
try these may help
1- rename it to *.cmd instead of *.bat WinNT/2k/XP
likes this name for a batch file.
2- Check if you have a call to a program or any other batch file that it should be proceeded by a "CALL" statment to return to the next statment foloing it.
3-Check that the user have a read and excute access to it.
4- Try to run it your selef step by step and see if it breakes some where.

Good luckl

Mohamed

by achat

I must add that we have 2 NT servers a PDC and BDC and the logon scripts are located only on the PDC. The domain sync has however been done.

by gigelul

Hi,
Generaly (default) the users are authenticating by the BDC. Copy your script in NETLOGON share on BDC. Also you can enable Replicator service on all workstation and PDC/BDC.

by benwagg

Answers 3/4 are right on. I should have thought to include:
7. Make sure your NetLogon directory is replicating to any BDC's.

Until you have the time to set up Replication (15 minutes - read & understand, + 5-10 minutes to configure PDC & BDC), you can manually copy the scripts from the PDC NetLogon share (c:\winnt\system32\repl\import\scripts) to the same share on the BDC.

by mikelazz

Definitely make sure that all of the scripts are in the Netlogon folders of both you PDC and BDC's. One thing I ran into was to make sure that the permissions of the login scripts are set to Everyone - Read on each.

by vh_s

If you have 1 PDC and 2 BDC's, you'll need to copy the logon scripts into the BDC's as well.

When user being served by the BDC, that BDC Netlogon shared directory is used to define what being run. If the user profile didn't find the login script,it would be just ignored.

That's why the people in Microsoft think about replication. So in case you have 1 PDC and multiple BDC's across the continent, you would need to change the login script at one place and it being copied directly into the other servers.

Synchronization didn't have anything to do with login script. Synchronization affect changes in user profile, security setting. Something like login script would need to be handled through replication.

vh_s

by achat

Thanks guys. I have set the replication and also copied the scripts to all servers. This has solved the problem But i would like to get back to the point 5 from ben. Putting a like "net use dirvename /delete" does not remove the drives that i have mapped by right clicking from network neighbourhood.
Did i miss out something??

by benwagg

Regarding your ref to my point #5:
True, the line,
NET USE N: /DELETE
may not remove your clients' RMB mapped-drives until the _next_ logon. This is because the drives were mapped with the NET USE setting to be on (/PERSISTENT:YES).

The NET USE command defaults to the last setting used, so if you don't change the default in your batch (script) from /PERSISTENT:YES, then...

I map drives explicitly in my logon scripts as follows:
NET USE N: \\servername\sharename /PERSISTENT:NO
As long as my wiseguy users don't try to get creative in mapping their drives, then this will be the most recent setting for NET USE.

This discussion is closed to new replies.