Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logon scripts

Status
Not open for further replies.

meloadri

Technical User
Apr 7, 2009
120
0
0
US
I am trying to run a logon script on server 2003 with no result. The script looks like this:

@echo off
net use q: /d
net use q: \\iqms\iqms

net use g: /d
net use g: \\lpinv\global

net use r: /d
net use r: \\iqmstest\iqms

net time \\lpinv /set /Q

I also need userA to have the H: mapped to HR and userB to have the H: mapped to accounting. i havethe script under the sysvol\domain\scripts. Can someone help?
 
Is the script even executing? How do you have it being applied (group policy/user account setting).
 
I don't see anything executing. I have it under group policy. This is what I did. I created a OU and put a group in it. I right click the OU, went to properties - Group policy tab. I then created a link with my OU and click on edit. I navigated to the script section. I went to the properties of the logon script. I clicked on show files, chose the script from the sysvol. Am I missing something?
 
Your users probably aren't getting that group policy applied to them. Run gpresult from a computer/user that should be getting this logon script but isn't. Under Users Settings section, your group policy should be applied. If it isn't, you need to figure out the proper link location for your new GPO.
 
I agree with baddos you need to make sure that the gpo is linked to the ou and that you delagate that group to have that gpo applied.
For your userA and userB best to make another GPO for each with the apropriate H: drv script applied and do the same for the delegation as above, except just have have a separate group for the hr drv and accounting drv applied apropriatly.

Windows Haiku:

Serious error.
All shortcuts have disappeared.
Screen. Mind. Both are blank.
 
So if I use GPO I can't use the good old "if member" statement? I have a lot of departments and users that belong to 2 different departments. You saying that I have to created a GPO for each department and a script for the H:drv?
 
Well no, 6 one way 1/2 dozen the other. From you statement above I didn't think you had built any logic into your logon script. If you have that built in to you script then you don't need 2 different groups.

Windows Haiku:

Serious error.
All shortcuts have disappeared.
Screen. Mind. Both are blank.
 
After running gpresults this is what I got: Applied group policy objects-Default Domain Policy. Then I get "The following GPO were not applied because they were filtered out" - Local Group Policy- Filtering- Not applied (Empty).
Also, in times when the GPO was applied it was from a server I do not want it applied from. What can I do?
 
So the GPO that you added the logon script to, was it "Default Domain Policy"? If not, then you need to check your links and/or security/WMI filtering.

As far as what server it's applied from, that is setup based upon your site setup. Unless your applying it from a remote site or something, I would probably leave it alone.
 
I moved out of GPO and into user accounts just to get this login script executed and it still does not. I think my issue now is that I do not have a sysvol directory under windows. This is the path were I have the script in the PDC: D:\SYSVOL\sysvol\liquidpac.com\scripts\login.bat. Iread an article saying that if the script is somewhere other than the Netlogon, I should use the full UNC. Instead of just typing login.bat in the user account profile tab, this is what I typed: D:\SYSVOL\sysvol\liquidpac.com\scripts\login.bat.
Is this wrong?
 
No, You should not type full UNC path in Logon script field. There should be login.bat and nothing more.
Check if You can access \\liquidpac.com\sysvol from workstations and try to execute script, using user's credentials.

===
Karlis
ECDL; MCSA
 
I went to a workstation and accessed liquidpac.com\sysvol\ through explorer and executed the script and it worked. It seems it has to do with the fact that I have the script in d:\sysvol\sysvol\liquidpac.com\scripts\, instead of d:\windows\SYSVOL\sysvol\liquidpac.com\scripts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top