Discussion Locked

LOGON SCRIPTS - GROUPS

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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.

5 replies

by syscokid

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.

by beermonster

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.

by rweraf13

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

This discussion is closed to new replies.