Can't get login script to work

I am messing around with Server 2003. I have a Win 2K machine and I have created an OU and assigned a group policy to it. Inside the group policy I have a logon script to run to map a share drive. The login script is basically just net use x: \\servername\sharename but for some reason it is not working.
I have it as the default group policy of that OU. The computer is definitely seeing the DC because I can set a password lockout policy and it takes effect. Other group policy settings work such as disabling the ability to see Recycle Bin or Control Panel.
The share definitely has the right permissions.
If i run the net use command directly from the command line on the Win2K computer it maps the drive with no problems. What am I doing wrong?

Comments

  • remyforbes777remyforbes777 Member Posts: 499
    Does anyone have any clues?
  • SmallguySmallguy Member Posts: 597
    all we do here is put the script in the sysvol folder and when the log on the sysvol is checked and the scruipt runs

    I don't think you need a group policy for this
  • sprkymrksprkymrk Member Posts: 4,884 ■■■□□□□□□□
    Login scripts run under the "User Configuration" portion of a GPO. So make sure you have Users in the OU and not just computers. It sounds like you applied the GPO to a computer object. Also make sure you are using a "Logon/Logoff" script and not a "StartUp/Shutdown" script, which will not work for accessing network resourses in most cases.
    All things are possible, only believe.
  • remyforbes777remyforbes777 Member Posts: 499
    The login script is located in the sys vol folder. The group policy does this automatically. The logon script is also applied in the User Configuration to an group policy under a specific OU and the user is part of that OU so its not being applied to a computer object but a user object.
  • thesemantheseman Member Posts: 230
    Sorry if this is really obvious, just covering the bases!

    Did you rename the script to a .bat file? Im reaching for straws here since it seems you did everything right, as it is a fairly simple thing to implement.

    Travis
  • remyforbes777remyforbes777 Member Posts: 499
    Yes I named it logon.bat.
    I edited the group policy for the particular OU, for example.
    I have an OU called Marketing, and a user named Terry in that OU.
    I right clicked the OU and went to properties. I clicked on the Group Policy tab. I clicked edit then selected Windows Setting then logon/logoff, then i double click on logon , then click on show files and I paste the login script there which adds it to the sysvol folder. I then click add and it opens the sysvol folder and I add the script, then click OK but when I logon under the user name Terry no logon scripts run. That is the only group policy assigned to that OU. I am stumped.
  • remyforbes777remyforbes777 Member Posts: 499
  • sprkymrksprkymrk Member Posts: 4,884 ■■■□□□□□□□
    I seem to remember where if you browse to the file when adding it, it doesn't work. Instead, try saving the script on a share, then when you add it type in the path to the share instead of browsing, like this:

    \\servername\sharename\login.bat

    You won't necessarily see it in the "Show Files" since it is not on the sysvol at that point, but it should work.
    All things are possible, only believe.
  • remyforbes777remyforbes777 Member Posts: 499
    Did that, still did not work. I am completely stumped. At first I thought it was because I am logging in using wireless but its seeing the DC because I can lock the account and unlock it on the domain and it works. Another thing, my folder redirection is not working either. The group policy is not taking effect for some reason.
  • sprkymrksprkymrk Member Posts: 4,884 ■■■□□□□□□□
    Check your event logs for Group Policy errors on the workstation.
    All things are possible, only believe.
  • TechJunkyTechJunky Member Posts: 881
    C:\SYSVOL\sysvol\domain.local\sripts is where your login scripts should be located.

    C:\SYSVOL\sysvol folder should be shared.

    Are these drives supposed to be mapped? If so make sure your bat looks like this.

    @echo off
    Net use S: \\SERVERNAME\SHARENAME
    Net use T: \\SERVERNAME\SHARENAME

    Thats how mine are set and they work fine.
  • w^rl0rdw^rl0rd Member Posts: 329
    Try adding the name of the script, not the full path, to the profile tab for the user account to test if it works here.

    If it does, then you know the problem is not with the script. Make sure you don't type in the UNC path to the script though because it checks the sysvol\netlogon share by default.
  • remyforbes777remyforbes777 Member Posts: 499
    W^rl0rd
    Thanks that worked. That fixed the logon script running but it still seems that folder redirection is not working properly in the group policy. It still seems as if the group policy is not working at all.
  • sprkymrksprkymrk Member Posts: 4,884 ■■■□□□□□□□
    That fixed the logon script running but it still seems that folder redirection is not working properly in the group policy. It still seems as if the group policy is not working at all.

    What do the event logs show on the workstation in question?

    Also, from the workstation try this:
    Go to START, Help and Support. Find the "Tools" link (mine is on the right under "pick a task"). Then on the left find the link for Advanced System Information, and finally clcik the link for "View Group Policy settings applied".

    You'll get lots of nice information you can save to an htm file. You should be able to see if your Folder Redirection policy is listed.
    All things are possible, only believe.
Sign In or Register to comment.