Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


February 2001

A Simple Command


RSS
Subscribe to Windows IT Pro | See More Administration Tools Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!
Main Article    Take Command of Your Management Tasks

The Net User command-line tool doesn't require the Microsoft Windows 2000 Server Resource Kit or the Microsoft Windows NT Server 4.0 Resource Kit and is simpler than the resource kits' Addusers tool. Net User doesn't require an import file, and you can run the utility in only one line. To create a new domain account, type or script the following command:

net user smith temppwd /add /fullname:"Bill Smith"
	/homedir:C:\home /profilepath:\\servera\profiles$\smith
	/scriptpath:logonscr.bat /domain

In this example, I've created an account called smith for the user Bill Smith. The account references Bill's home directory on a local drive. (The /homedir setting doesn't work with Uniform Naming Convention—UNC—paths as Addusers does.) His profile path points to a directory named smith under the profiles share on a server named servera. The /scriptpath option references the file logonscr.bat in the NETLOGON share of the domain controllers (DCs). By default, NT assumes that the specified logon script resides in the NETLOGON share. Each NT DC maintains the path C:\winnt\system32\repl\import\scripts as the NETLOGON share.

You can remove unneeded fields from the command. For example, when you create accounts on a member server or workstation, you can omit the /domain switch. (If you'd rather use a random password instead of using the password temppwd, you can use the -p switch with the Win2K resource kit's cusrmgr utility. Run this utility after you run Net User.) To view the syntax for Net User, at the command line, type

net help user | more

End of Article



Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

How can I stop and start services from the command line?

...

Microsoft Touts Xbox 360 'Black Friday' Success

Microsoft this week revealed that its Xbox 360 video game console outsold its Sony PlayStation 3 rival 3-to-1 on "Black Friday," which curiously describes the three day weekend after Thanksgiving, a period that unofficially kicks off the holiday selling ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing