Discussion Locked

Nt login script

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

I'm trying to map a network drive on an Nt 4.0 server sp6. I want to be able to map the drive if the user is a member of a specific group.
Ex.
If member of Xgroup then net use x:\\server\share.
Does any such command exist.
Thanks

8 replies

by charger media

Go to User Manager for Domains, select user, then select Profiles. From there you can set the login script and name shared drive.

by charger media

Forgot to add this to above post: you need to create user/group-specific logins first. For example, you may write a login script for developers and name it dev.bat, you can do one for administrators and call it admin.bat, sales could be named sales.bat, etc. etc.

Create the script a in text editor with the following code:

net use x:\\servername\foldername
net use y:\\servername\foldername

(x and y are the drive letters you assign mapping to)

Save as .bat file. Then specify the script in User Manager for Domains as mentioned above.

by syscokid

Here's a sample logon.bat that maps drives on group membership:

@Echo off
rem
rem * LOGON.BAT
rem *
rem *
rem *
rem * %1 is the user's group membership
rem * passed as a parameter by User Mgr
rem * for Domains (e.g., in the spaceto
rem * point to the script in User Mgr, put
rem * the parameter after the script name: rem *logon.bat common)
rem *
rem
:whoru
if %1==slc goto :slc
if %1==managers goto :managers
if %1==common goto :common
Echo "No Group memberships, Please see your Administrator or SLC."
Pause
goto END

:common

NET USE S: \\servername\shared
NET USE Z: \\servername\apps
goto end

:slc

NET USE Q: \\servername\adminapps
NET USE S: \\servername\shared
NET USE U: \\servername\users$
NET USE V: \\servername\profiles$
NET USE Z: \\servername\apps

goto end

:managers
NET USE M: \\servername\mgrdata
NET USE Q: \\servername\adminapps
NET USE S: \\servername\shared
NET USE Z: \\servername\apps

gotoend

:end

This discussion is closed to new replies.