General discussion

Locked

LOGON SCRIPTS - GROUPS

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.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

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.

Collapse -

LOGON SCRIPTS - GROUPS

by rweraf13 In reply to LOGON SCRIPTS - GROUPS

Poster rated this answer

Collapse -

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.

Collapse -

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.

Collapse -

LOGON SCRIPTS - GROUPS

by rweraf13 In reply to LOGON SCRIPTS - GROUPS

This question was closed by the author

Back to Windows Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums