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!

Creating Multiple User Accounts

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am an administrator in a school with about 1200 users. I have created the usernames and home directories using a batch file, with all permissions, login scripts and shares etc. We are running windows 2000 advanced server on the servers and windows '95 on the desktops with terminal services. The problem is i cannot get the user accounts to automatically map to the home directories without actually manually entering the:- H: \\<servername>\%username% into each one of the &quot;connect to&quot; boxes. 1200 times is gonna get boring. Just wondering if anyone knows of a way i can put this into my batch file or or can help. PLEASE !!!

Many thanks

Olly.
 
I know this must be obvious... have you tried adding a &quot;net use&quot; to your batch file (e.g. &quot;net use f: \\servername\%username%)?
 
Depending on what OS, and if the PC is running netbios, try

NBTSTAT -a computername
NBTSTAT -A 1.2.3.4
 
Sorry about previous post. I was replying to a different question. I could swear the forum put it in the wrong place...

To answer your question: If you are using &quot;net.exe user /add&quot; to create the accounts, you can specify the /homedir parameter. Do &quot;net help user&quot; for help. The problem with net.exe is that you have to run the script ON the domain controller, and you can't change user settings after the account is created. If you're going to be doing a lot of scripting I would recommend dsmod.exe from the ADMINPAK.MSI. I would also recommend using the newest available version of adminpak, &quot;.NET Server Administration Tools Package beta 3&quot;. It is a beta, and despite the .Net name, it works well on Win2000. (MS of course promised to release the final version before 2002...)

I use &quot;dsadd user&quot; extensively to script creation of accounts on my W2k servers. Just look at all the cool stuff these tools can do.

Usage Help:

Example of changing a user's homedir:
dsmod user &quot;CN=John Smith,CN=Users,DC=university,DC=edu&quot; -homedir &quot;Z:\users\John Smith\&quot;
 
Yes, I had the same problem. This is what I did. I set up a login script (actually added to the existing script) the 'net use' to map to the folder 'users' and then use the 'subst' DOS command to get directly to the specific users folder.

This is what it looks like.
___________
net use i: \\ofc-centralpdc\user
subst h: i:\%username%
____________
look up the subst in dos help. Go to cmd prompt and type 'subst /?'
 
slightly confused tim....

what was wrong with:
net use h: \\ofc-centralpdc\users\%username%

;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top