I was able to create and successfully add 100 users via addusers.exe but there were two snags. Most everything worked as expected but the home directories were not created.
1) Using the Computer Management/Local Users and Group/Users application: The "Local path" on the Profile tab was correct, it just didn't create the directory. If I individually select an account, click on the Profile tab and click the OK button then the directory will be created. Obviously doing that a hundred times defeats the purpose of being able to create scripts, but what is the problem?
Comment: The documentation that came on the Windows 2000 Server Resource Kit incorrectly documents the addusers.exe specification for the "[User]" section of the input file. It shows "HomeDriveAndPath" as being the fifth argument but is should be the sixth given:
[User]
Username,FullName,Password
,Comment,H
omeDriveAn
dPath,Prof
ile,Script
,
should be:
[User]
Username,FullName,Password
,Comment,?
??,HomeDri
veAndPath,
Profile,Sc
ript
2) I confirmed this via the "addusers /d filename" command and examining the results. Does anyone know what the parameter represented by the "???" should be?
<UPDATE> The correct syntax for the [User] section is:
[User]
Username,Fullname,Password
,Comment,H
omeDrive,H
omePath,Pr
ofile,Scri
pt
Note: This is not documented that I could find. If you specify both HomeDrive and HomePath, it will try to map that drive to the HomePath. If you give a HomePath and don't specify a HomeDrive, it will use the HomePath as the local path for the home directory. The label "ConnectAsDrive" would probably have been more descriptive than what the documented "HomeDrive".
Corrected documentation can be found under "Microsoft Knowledge Base Article - 199878" at:
http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b199878Even after these corrections, my original problem described in 1) still occurs.
</UPDATE>
Here is an example of my script. Maybe I've overlooked something:
[User]
user001,,xyzzy,,,E:\home\u
ser001,,
[Global]
[Local]
Users,,BOXNAME\user001,
Special,,BOXNAME\user001,
Comment: The arguments (if used in the order listed) will not work if you use "/p:". E.g.:
addusers /c /p:c /p:e filename
will return an error:
Error: filename parameter required immediately after (/c|/d|/e)
however:
addusers /c filename /p:c /p:e
is accepted.
<UPDATE> The following is excerpted from UPDATE link above:
AddUsers {/c|/d{:u}|/e} filename [/s:x] [/?] [\\computername|domainname
] [/p:{l|c|e|d}]
</UPDATE>
Thanks in advance, --Jim
View the Solution FREE for 30 Days