Why login.bat applied to a simple user account doesn't work ?

M

Marlon Brown

I go to the MyUserAd account and under 'profile' tab I put it on "login
script":
\\myserver\share\share2\logon.bat
The content of the logon.bat is something like
REM *** hello
net use f: \\myserver3\share

If logon as MyUserAd, I see no indication at all that any logon.bat is
running. I go to the command promp and I am able to browse to
\\myserver\share\share2\ and launch logon.bat and successfully get drive f:
mapped. I tried shorter paths such as \\myserver\share\logon.bat and that
doesn't work either.

I created other user accounts as testing, but again I am not successfull
making this simple .bat work upon login. I go to a DC and I run "net user
<myuserad>" and I see the information there that confirms the login script
applied to the user account profile.

What am I missing here ?

Win2KADSP4, WinXPSP2 clients.
 
M

Marlon Brown

I guess it should work if put the darn logon.bar under \sysvol and just
input "logon.bat" under the profile tab.
Is that the only to make this work then ?
 
S

Steve

You can also use vb script or you could define the logon script in a GPO and
apply that instead, using GP filtering based on security group membership

either way its up to you

yup it's a good idea to have the login script in the sysvol share, it
ensures that it is replicated to all dc's and the share is open to all
domain uses to read the script if it is assigned to them

hth
rgds
Steve
 
M

Marlon Brown

OK, my question is this:
Does it have to be on the logon share, or if you put something like
\\fileserver\share

I have a way to make that work as well ?
 
S

Steve

AFAIK (and I am sure someone will point out if I am incorrect) the inital
script has to be in the sysvol share,
SYSTEMROOT%\SYSVOL\domain name\SCRIPTS (this is shared in win2k on a DC as
the netlogon share)
and it must be called login.bat this is by design
as it will always reference the %SYSTEMROOT%\SYSVOL\domain name\SCRIPTS path
then login.bat is all that is required under the users profile in Ad users
and computers

you can call always call other scripts from the login script if you require.

hth
rgds
Steve
 

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