Discussion:
Login script in AD
(too old to reply)
Gis Bun
2007-10-19 19:04:03 UTC
Permalink
Hi. I'm trying to get a login script going. I created an OU, dumped a test
user in it. The user as no out of the ordinary privledges. Just a domain user.

In the OU I created a new policy. In the policy, I just want to have the
user login with a login script located at \\myserver\netlogon\login.bat

So I drill down to User Configuration\Windows Settings\Scripts
(Logon\Logoff)\Logon and add the script mentioned above.

The above script is there and it works [well, as long as it requires no
privledges] as I had it in the Profile tab in the user's account.

But when I login with the user, I see no evidence that it ran. No "DOS" box
or anything.

Ideas? I'm sure I'm missing something that's too easy....

Thanks
Richard Mueller [MVP]
2007-10-19 20:34:35 UTC
Permalink
Post by Gis Bun
Hi. I'm trying to get a login script going. I created an OU, dumped a test
user in it. The user as no out of the ordinary privledges. Just a domain user.
In the OU I created a new policy. In the policy, I just want to have the
user login with a login script located at \\myserver\netlogon\login.bat
So I drill down to User Configuration\Windows Settings\Scripts
(Logon\Logoff)\Logon and add the script mentioned above.
The above script is there and it works [well, as long as it requires no
privledges] as I had it in the Profile tab in the user's account.
But when I login with the user, I see no evidence that it ran. No "DOS" box
or anything.
Ideas? I'm sure I'm missing something that's too easy....
See "How do I configure a Logon Script with Group Policy" in this link:

http://www.rlmueller.net/LogonScriptFAQ.htm

Best practice is to copy the file you want for the Logon script to the
Windows clipboard, open the “Logon” setting in the Group Policy editor,
press the “Show Files...” button, and paste the desired file in the dialog.

The path you gave is used for logon scripts configured on the Profile tab in
ADUC for each user. Group Policy is much easier.
--
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--
Gis Bun
2007-10-23 14:19:03 UTC
Permalink
Post by Richard Mueller [MVP]
Post by Gis Bun
Hi. I'm trying to get a login script going. I created an OU, dumped a test
user in it. The user as no out of the ordinary privledges. Just a domain user.
In the OU I created a new policy. In the policy, I just want to have the
user login with a login script located at \\myserver\netlogon\login.bat
So I drill down to User Configuration\Windows Settings\Scripts
(Logon\Logoff)\Logon and add the script mentioned above.
The above script is there and it works [well, as long as it requires no
privledges] as I had it in the Profile tab in the user's account.
But when I login with the user, I see no evidence that it ran. No "DOS" box
or anything.
Ideas? I'm sure I'm missing something that's too easy....
http://www.rlmueller.net/LogonScriptFAQ.htm
Best practice is to copy the file you want for the Logon script to the
Windows clipboard, open the “Logon” setting in the Group Policy editor,
press the “Show Files...” button, and paste the desired file in the dialog.
The path you gave is used for logon scripts configured on the Profile tab in
ADUC for each user. Group Policy is much easier.
Thanks. That seems to do the trick. Now I just need to verify the script
works fine. One issue left is importing a REG file for registry fixes that
aren't part of AD (example, simple file sharing - see a more recent thread on
why).

I am using a test account with no admin access and it seems to be ignoring it.

Thanks
Simon
2007-10-23 15:53:10 UTC
Permalink
Where is the reg file for importing? Netlogon folder?
Post by Gis Bun
Post by Richard Mueller [MVP]
Post by Gis Bun
Hi. I'm trying to get a login script going. I created an OU, dumped a test
user in it. The user as no out of the ordinary privledges. Just a domain user.
In the OU I created a new policy. In the policy, I just want to have the
user login with a login script located at \\myserver\netlogon\login.bat
So I drill down to User Configuration\Windows Settings\Scripts
(Logon\Logoff)\Logon and add the script mentioned above.
The above script is there and it works [well, as long as it requires no
privledges] as I had it in the Profile tab in the user's account.
But when I login with the user, I see no evidence that it ran. No "DOS" box
or anything.
Ideas? I'm sure I'm missing something that's too easy....
http://www.rlmueller.net/LogonScriptFAQ.htm
Best practice is to copy the file you want for the Logon script to the
Windows clipboard, open the “Logon” setting in the Group Policy editor,
press the “Show Files...” button, and paste the desired file in the dialog.
The path you gave is used for logon scripts configured on the Profile tab in
ADUC for each user. Group Policy is much easier.
Thanks. That seems to do the trick. Now I just need to verify the script
works fine. One issue left is importing a REG file for registry fixes that
aren't part of AD (example, simple file sharing - see a more recent thread on
why).
I am using a test account with no admin access and it seems to be ignoring it.
Thanks
Gis Bun
2007-10-23 19:28:01 UTC
Permalink
It's in the same folder as the script.

I tried: regedit /s regfixes.reg

I also tried: regpol regfixes.reg

[regpol.exe, a utility that imports REG files is also in the same folder as
the script].

I know the script is running because it's mapping a drive and IFMEMBER.EXE
is also in that folder.

Thanks
Post by Simon
Where is the reg file for importing? Netlogon folder?
Post by Gis Bun
Post by Richard Mueller [MVP]
Post by Gis Bun
Hi. I'm trying to get a login script going. I created an OU, dumped a test
user in it. The user as no out of the ordinary privledges. Just a domain user.
In the OU I created a new policy. In the policy, I just want to have the
user login with a login script located at \\myserver\netlogon\login.bat
So I drill down to User Configuration\Windows Settings\Scripts
(Logon\Logoff)\Logon and add the script mentioned above.
The above script is there and it works [well, as long as it requires no
privledges] as I had it in the Profile tab in the user's account.
But when I login with the user, I see no evidence that it ran. No "DOS" box
or anything.
Ideas? I'm sure I'm missing something that's too easy....
http://www.rlmueller.net/LogonScriptFAQ.htm
Best practice is to copy the file you want for the Logon script to the
Windows clipboard, open the “Logon” setting in the Group Policy editor,
press the “Show Files...” button, and paste the desired file in the dialog.
The path you gave is used for logon scripts configured on the Profile tab in
ADUC for each user. Group Policy is much easier.
Thanks. That seems to do the trick. Now I just need to verify the script
works fine. One issue left is importing a REG file for registry fixes that
aren't part of AD (example, simple file sharing - see a more recent thread on
why).
I am using a test account with no admin access and it seems to be ignoring it.
Thanks
Loading...