General discussion

  • Creator
    Topic
  • #2089209

    LOGON SCRIPTS – GROUPS

    Locked

    by rweraf13 ·

    I have unsuccessfuly incorporated “ifmember” into logon script.

    :MEMBERS
    echo Mapping specialist drives
    ifmember sapa
    if %errorlevel%==0 goto NEXT1
    net use: \\ourPDC\sapa /persistent:no

    Group and share exist. Can someone please put me right.

All Comments

  • Author
    Replies
    • #3808688

      LOGON SCRIPTS – GROUPS

      by syscokid ·

      In reply to LOGON SCRIPTS – GROUPS

      We take a slightly different approach. We pass the user’s group membership as a command line parameter to logon.bat by including it in User Manager for Domains on the logon script path line. For example, the logon script path reads something like
      logon.bat common.

      Then in logon.bat we read the parameter as %1, thusly:

      :whoru
      if %1==slc goto :slc
      if %1==managers goto :managers
      if %1==common goto :common

      and the :common section looks like this:

      :common
      NET USE Q: \\servername\apps /persistent:no
      NET USE S: \\servrname\shared /persistent:no

      And so on. Works fine.

      Hope this helps.

    • #3808652

      LOGON SCRIPTS – GROUPS

      by beermonster ·

      In reply to LOGON SCRIPTS – GROUPS

      Put group membership in the login script field ? Not a route I would go down to be frank. try changing the script to read
      ifmember /list
      pause
      and log in as the user. Ifmember will display a list of the groups it thinks your user is a member of. Check that the sapa group is displayed, spelt as you have it in your script. If thats the case, then try altering the syntax to be –
      if NOT %errorlevel%==0 net use \\ourPDC\sapa /persistent:no

      and see what happens. BTW i take it that the colon after net use is a typo ??? the net use command won’t run with it in.

      • #3672610

        LOGON SCRIPTS – GROUPS

        by rweraf13 ·

        In reply to LOGON SCRIPTS – GROUPS

        Not the complete answer to my problem but at least it has pointed me in another direction.

    • #3672608

      LOGON SCRIPTS – GROUPS

      by rweraf13 ·

      In reply to LOGON SCRIPTS – GROUPS

      This question was closed by the author

Viewing 2 reply threads