Discussion Locked

Mapping drive to user directory

0 helpful
17 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Does anybody know the proper way to write a login script so that the user's home directory is maped to a drive letter. I only know how to map to the user directory. With hundreds of user directory folders to scroll through, the user becomes frustrated and I don't want the users to access the user directory, just their specific home directory.

17 replies

by gary sharp

The way to do this is to set up each user directory as a share, you can do this with a script. Then assign rights to these shares to the users, again, doable with a script. The login script will use the %username% variable to map to the appropriate share.

g

by mwpowell

Use User manger to do this, I found this to be the easiest way. Open the properties of the user in user manager. Then click on the profile button. In the "Home directory" box you can specify the drive letter and the path to the users directory. If you want to use logon scripts you can use the following line "net use :\\%username%".

by paultalb

This is a problem with NT 4.0, Win 2000 fixes this issue. One solution is to change the security for each directory so only the users directory is visible, or make each users directory a share, then map the home directory to the each users share using "net use x: \\servername\userdirshare\"

by guy

If you are using logon scripts you can try the SUBST command to substitute a drive letter for the home directory. More info in www.winntmag.com
e.g.
if exist P:\*.* Net use P: /delete
net use P: /home
subst K: P:\%username%
Net use P: /deleteif exist P:\*.* Net use P: /delete

by wayne.maples

In their logon script, you should be able to use the SUBST command to map the drive:\homedirectory combination to a drive letter

subst h: x:\users\wmaples

-Wayne

by rmmcp

Want to hide it. Add the $ sign to the share name of the "user data" directory. Then for each user assign a home drive and letter in "User Manager for Domains". When they logon, they'll have that home drive, but will not be able to see the entire share. The only way to get to it is know the specific name. They can't just browse to it. Or, you can assign permissions to each user's share folder to that specific user. That would be a tedious load.

by mrochr

Ok all those options are viable but a real pain in the tail. Trust me I just did this last week 400 users and sharing then mapping is ridiculous. All you have to get is rootuse (command) and copy to machines with this script. Here is the scripts that you will need and they work great.
@echo off
net use z: \\server\rootuse$ /persistent:no
copy z:\rootuse.exe c:\*.*
net use y: \\server\timeserv$ /persistent:no
copy y:\timeserv.exe C:\winnt\system32\*.*
copy y:\timeserv.ini C:\winnt\*.*
copy y:\timeserv.dll C:\winnt\system32\*.*
net use x: \\server\sleep$ /persistent:no
copy x:\sleep.exe C:\winnt\*.*
net use u: \\sdc003\sssinfo$ /persistent:no
copy u:\sysinfo.scr C:\winnt\system32\*.*
(also in here is timesever if you dont want to give users permissions to change time)

@echo off
C:\rootuse h: /d sleep 1
C:\rootuse h: \\server\home\%username%
sleep 1
net use p: /d /y
I used this in my other job for 2yrs no problems.

Rick MCSE
CBH IT Manager

This discussion is closed to new replies.