Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

net user /homedir sets drive to Z

Status
Not open for further replies.

goecs

Technical User
Aug 8, 2001
13
US
When I run a net user command to set users home directory, the drive letter in the profile says Z.
I'm doing this:
net users username /homedir:\\server1\sharename /domain

How can I make the drive letter for the home directory go to H?

Thanks,
Chris.
 
In any login script you create, you could use the environment setting "Homedrive". This sets the drive letter.

You could say:

'homedrive=H:'

This would work in conjunction with the 'homeshare' variable, which would define the network path for your homedrive.

Your homeshare variable would look like 'homeshare=\\server1\sharename'

I know this is a pain, since this setting needs to be put in place within the user's own context, unlike the rest of your script. Anyone else know a better way?
 
Just do the following:

In the User Manager for Domains select all the required users. Navigate to their properties, click Profile and in the Home Directory section there will be two options: Local Path and Connect. Change the "Connect" from the default Z to H. This should solve your problem.

Good Luck!
 
In UMD set the home directory using the %username% variable. If you are using NT Workstations (ie not 9x), specify the drive letter.

In the login script, use

net use h: /home

Done.
 
I have over 400 existing users that need home dirs. It is too time consuming, and wrist wrecking to click thru user manager for domains to make the drive letter change. Using %username% only works if the homedir is not shared. There is no way, I know of, to append a dollar sign to that variable within user manager.

I read there is an undocumented switch or something that allows you to specifiy the drive letter of the /homedir option.

Does anyone know of this switch?

Chris.
 
Create a USERS folder and share it to all domain users.

Select all the relevant users in UMD. File Properties. Change the home directory letter, set the home directory to \\servername\users (the one you did above). Create a login script that has the

net use h: /home

All the directories will be created for you with the right permissions. Everything is done. No aching wrists (well, not connected with the above anyway).
 
You can use CUSRMGR, a Win2k reskit utility. CUSRMGR can change the drive letter of existing user home dirs, and do other stuff as well. It works on nt4 and win2k. Don't know about xp.

The command interpreter (command prompt) is much more powerfull than umfd. Using batch files and reskit utilities can practically automate most user admin tasks.

cusrmgr -u username -H h: -m \\yourpdc machine name.

Thanks for all the tips.
Chris.

 
you can go to user manager and select all the users at the same time.(the same way you would select multiple files)
then go to properties and change the "z" to "h". you only have to do it once because all the users are selected. then use your "net use" command in your log in script.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top