Announcement

Collapse
No announcement yet.

2K3 SP2 unable to get login script to run on clients

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • 2K3 SP2 unable to get login script to run on clients

    I am new to server 2003 and AD so please excuse what must be a very basic question.

    I have been trying to get a simple login script to run to map network drives. The script is :


    echo on
    net use v: \\server\share /persistent:no
    pause


    I have added this (logon.bat) to the NETLOGON folder which in my case is located at :
    F:\WINDOWS\SYSVOL\sysvol\mediaserver.int\SCRIPTS

    This did not result in the script running at logon so following a different set of instructions that I found I then from AD users and computers edited the default domain users group policy navigated to user config,windows,scripts,login then clicked “show files” and added my .bat here as well.

    This location was :
    \\mediaserver.int\sysvol\mediaserver.int\Policies\ {31B2F340-016D-11D2-945F-00C04FB984F9}\User\Scripts\Logon

    Having logged out and in on the client and also running GPUPDATE I still can’t get the script to run on login.

    The clients are all Vista SP1 and the script runs on the clients without issue.

    I presume I have missed something basic but from all the searches I have done I am none the wiser.

    Any assistance would be gratefully received

  • #2
    Re: 2K3 SP2 unable to get login script to run on clients

    If you want to use a logon script you can use several ways of applyng the policy:
    1. Define the Logon script in the user object
    2. Define the logon script in a policy applied to the user object
    3. Place the script locally %Systemroot%\Windows32\USRLOGON.CMD


    1)Place the script in %Domain%\Sysvol\%Domain%\Scripts, and define the script in the user object (Profile\Logon Script\%logonscript.bat%).

    2)Define the scrip in a policy, place the script in the scripts folder. In the policy define the UNC path to the script.

    3) Place the script locally %Systemroot%\Windows32\USRLOGON.CMD on every machine. Less advisable because it is hard to manage. Often used for Terminal Servers and or in Workgroups.
    [Powershell]
    Start-DayDream
    Set-Location Malibu Beach
    Get-Drink
    Lay-Back
    Start-Sleep
    ....
    Wake-Up!
    Resume-Service
    Write-Warning
    [/Powershell]

    BLOG: Therealshrimp.blogspot.com

    Comment


    • #3
      Re: 2K3 SP2 unable to get login script to run on clients

      Hi,

      It looks like there is no permission issue on the Batch file as you mention that the script runs fine if executed manually.
      It also looks like you have placed the script in the right folder.

      What you have not done or failed to mention is to get the User account (S) to use the script.
      If you have not done that already, then you need to go to ADUC
      and go to the
      • User account Properties (Mult-select | R-click | Properties if you want to apply to more than one user at a time).
      • Click on the Profile tab and put in the Logon script name (Plus extension .bat) in the Login script section.
      • Ok

      I am not sure about the Group policy you mention there.

      Cheers
      Caesar's cipher - 3

      ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

      SFX JNRS FC U6 MNGR

      Comment


      • #4
        Re: 2K3 SP2 unable to get login script to run on clients

        Killerbe – I an attempting to do #2 but for some reason it does not run.

        L4ndy – group policy should negate the need to specify the individual users that the script runs for, by using the default user group my understanding is that the login script will run for all members of the “user” group.
        I think I will try this for a single specific user to test if that functionality works and then at least I should be able to tell if it my misunderstanding of group policy that causing the issue

        thank you for your ideas

        Comment


        • #5
          Re: 2K3 SP2 unable to get login script to run on clients

          Got a bit confused on the OP. It must be the "last day of the week syndrome" If I am allowed to use that as an excuse for not reading the post properly

          Yep, you right. about the GP especially if applied at the domain level. I didn't imply that you needed to do that either I just thought you were going for the first otpion!

          Anyway, a few more ideas if I may. Are including the extention when puting in the login script in the user properties?
          Also noticed that the clients are Vista in which case you are going to have a bit of a problem in your hand to get the G policy to apply.
          Can you also check the permissions on the folder you are mapping?

          Ta
          Last edited by L4ndy; 5th December 2008, 17:02.
          Caesar's cipher - 3

          ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

          SFX JNRS FC U6 MNGR

          Comment


          • #6
            Re: 2K3 SP2 unable to get login script to run on clients

            Originally posted by L4ndy View Post
            Got a bit confused on the OP. It must be the "last day of the week syndrome" If I am allowed to use that as an excuse for not reading the post properly

            Yep, you right. about the GP especially if applied at the domain level. I didn't imply that you needed to do that either I just thought you were going for the first otpion!

            Anyway, a few more ideas if I may. Are including the extention when puting in the login script in the user properties?
            Also noticed that the clients are Vista in which case you are going to have a bit of a problem in your hand to get the G policy to apply.
            Can you also check the permissions on the folder you are mapping?

            Ta
            all ideas are welcome!

            i thought you had cracked it there when i saw that i had not included the file extension but even after adding it it still failed to run.

            folder permissions are fine, i can access and run the login script on the server from the client without issue.

            i tried setting the login script to a single user to check if it was a group policy issue and still no luck.

            from some further reading i have found that this is indeed an issue with 2003 and Vista clients. there are a few workarounds but it seems there is no real fix other than server 2008 - which deals with vista and scripts differently

            Comment


            • #7
              Re: 2K3 SP2 unable to get login script to run on clients

              Probably won't help, but try using a VBS script to map drives instead. I believe the use of net use is deprecated now anyway.
              Gareth Howells

              BSc (Hons), MBCS, MCP, MCDST, ICCE

              Any advice is given in good faith and without warranty.

              Please give reputation points if somebody has helped you.

              "For by now I could have stretched out my hand and struck you and your people with a plague that would have wiped you off the Earth." (Exodus 9:15) - I could kill you with my thumb.

              "Everything that lives and moves will be food for you." (Genesis 9:3) - For every animal you don't eat, I'm going to eat three.

              Comment


              • #8
                Re: 2K3 SP2 unable to get login script to run on clients

                interestingly, user specific login scripts are now running.

                nothing has changed since yesterday but for some reason it now runs. i have added the script to a second user account and that ran on login straight away so i think it is ulikely to be a delay in propagation to the DC.

                i am confused but happy. still no luck with group policy though

                Comment


                • #9
                  Re: 2K3 SP2 unable to get login script to run on clients

                  Does the script show if you type the following???

                  \\domianname\NETLOGON

                  Please insert your actual domain name in domianname.

                  Comment


                  • #10
                    Re: 2K3 SP2 unable to get login script to run on clients

                    Originally posted by wullieb1 View Post
                    Does the script show if you type the following???

                    \\domianname\NETLOGON

                    Please insert your actual domain name in domianname.
                    from the client? yes it does and it will run from there on the client. it just does not seem to run through group policy.

                    it will run when added to the specific user accounts

                    Comment


                    • #11
                      Re: 2K3 SP2 unable to get login script to run on clients

                      Any errors in the event logs?
                      Gareth Howells

                      BSc (Hons), MBCS, MCP, MCDST, ICCE

                      Any advice is given in good faith and without warranty.

                      Please give reputation points if somebody has helped you.

                      "For by now I could have stretched out my hand and struck you and your people with a plague that would have wiped you off the Earth." (Exodus 9:15) - I could kill you with my thumb.

                      "Everything that lives and moves will be food for you." (Genesis 9:3) - For every animal you don't eat, I'm going to eat three.

                      Comment


                      • #12
                        Re: 2K3 SP2 unable to get login script to run on clients

                        Originally posted by gforceindustries View Post
                        Any errors in the event logs?
                        no, no errors in the log but I have figured out the problem....

                        as always, user error

                        what I was doing wrong was:

                        when I defined the location of the script in GP I used the location

                        F:\WINDOWS\SYSVOL\sysvol\mediaserver.int\SCRIPTS\l ogin.bat

                        not

                        \\mediaserver\netlogon\login.bat

                        once this was corrected GP ran correctly and the script now runs.

                        stupid mistake as I copied the location from explorer to avoid error and as a newbie to MS server did not realise my mistake.

                        thank you to all who have tried to point me in the right direction

                        Comment


                        • #13
                          Re: 2K3 SP2 unable to get login script to run on clients

                          No worries mate, easily done Thanks for posting back with your findings.
                          Gareth Howells

                          BSc (Hons), MBCS, MCP, MCDST, ICCE

                          Any advice is given in good faith and without warranty.

                          Please give reputation points if somebody has helped you.

                          "For by now I could have stretched out my hand and struck you and your people with a plague that would have wiped you off the Earth." (Exodus 9:15) - I could kill you with my thumb.

                          "Everything that lives and moves will be food for you." (Genesis 9:3) - For every animal you don't eat, I'm going to eat three.

                          Comment

                          Working...
                          X