You can automate user account creation and home folder assignment. You can use the net user command to create local user accounts in configuration scripts.
Create a logon script
The following example creates a user named "tester". The user is created with a comment, password expiration settings, home folder, and profile path configured:
NET USER tester /add /comment:"Example Account for User"
/expires:never
/homedir:\\zippy\%username%$
/profilepath:\\zippy\profile
Assign a logon script to a profile
To assign a logon script to a profile, follow these steps:
| 1. |
Click Start, point to Settings, and then click Control Panel. |
| 2. |
Double-click Administrative Tools, and then double-click Computer Management. |
| 3. |
In the console tree, click Local Users and Groups, and then click Users. |
| 4. |
Click the user account, click Action, and then click Properties. |
| 5. |
Click Profile, and then type the file name of the script in the Logon script box.
Note: For local accounts, the logon script path is %Systemroot%\System32\Repl\Import\Scripts. However, this folder is not created if you perform a clean installation of Windows Server 2003. If the logon script is stored in a subfolder of the domain controller, type the following login script path before the logon script name:
sysvol\domainname\scripts
|
Note: You can also use Group Policy to assign home folders. For additional information about using Group Policy to assign home folders see the "To change the path of a user's home directory" topic in the Windows 2003 help files.