Announcement

Collapse
No announcement yet.

Login script hanging at user login

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

  • Login script hanging at user login

    Hi, hoping someone can help!

    I have a login script running for staff users on my school network, and at a remote campus, its not applying for some staff. On login, the "Netlogin" share shows up in My Computer, but no drives or printers will map. It seems to hang there. I can map their drives manually, but in testing nothing happens!

    I have 3 sites, with a DC at each site replicating to each other. Sysvol scripts seem to replicate OK, but staff aren't getting their drive and printer mappings. Here at my main site, I have a secondary DC, which is a backup DC and it seems that when staff login here, the Netlogon share shows up and won't close off. This server is holding the FSMO roles even though its a temporary server. It was installed to introduce a Win 2003 server to the domain, which was previously all Win2K servers. I do want to remove this one, but am reluctant to do so at the moment and risk upsetting the balance.

    I don't know why the login script isn't closing off. If I test a user, then rerun the login script from the Netlogon share, it closes then. My question is: why isn't the script closing after it runs?
    I'm stuck on this and its getting quite urgent. FRS seems to be OK between the sites, but I'd like to resolve this ASAP.

    many thanks in advance..


    Villagorilla

  • #2
    Re: Login script hanging at user login

    When the logon script gets hung, what is in the CMD window? Is it trying to do something or waiting for input? Sometimes a log on script will hang if it is trying to map to a resource that the user does not have access (permissions) to, but this doesn't sound like the case if you can map the resources manually. How do you map them manually, using a "net use" statement or through Windows Explorer?

    Comment


    • #3
      Re: Login script hanging at user login

      Hi,

      I found a typo that was causing me grief. I must have inadvertently put in a "d" at the end of the second line here:

      z:\ifmember psck_curricstaff
      if errorlevel 1 goto psck_curricstaff_mapd

      it should read: "if errorlevel 1 goto psck_curricstaff_map"

      It uses a net use statement as in here:

      @echo off
      echo **************************
      echo Starting ssca logon script
      echo **************************

      net use /persistent:no
      if exist z:\ net use z: /d
      net use z: "%LOGONSERVER%\Netlogon"

      So, I just tested it and it maps the drives, but, now the logon script doesn't exit at the end. The script reads on the last line:

      "net use z: /delete /yes"

      but I still get the Netlogon drive mapped in the Explorer window. It seems to be waiting for something to happen, because if I open the Netlogon share, and run the script from there, it says:

      **************************
      Starting ssca logon script
      **************************
      The command completed successfully.

      There are open files and/or incomplete directory searches pending on the connect
      ion to z:.

      Is it OK to continue disconnecting and force them closed? (Y/N) [N]:

      type y and enter, and the Netlogon share closes, as its supposed to. Can you see anything wrong wiht the end of the script? I'll go back through it and see if I can find anymore typos...

      Thanks for getting back to me. Once I looked at it more closely, I found where I'd gone wrong. But, I'd still like to know why its not exiting.

      Regards

      Villagorilla

      Comment


      • #4
        Re: Login script hanging at user login

        HI,

        I have the script working OK now. I remmed out some lines that pointed to a couple of pc's and the Netlogon share is closing out. It was (I think) looking for the PC's so it could map a printer. Will create a group and add users to it so they can access the printer.

        Thanks for your reply joeqwerty, it made me take another look at the script and find the typo. Still gotta get used to scripting...

        Regards

        Villagorilla

        Comment

        Working...
        X