addusers.exe (Win2k Server Resource Kit)

From: Jim (jlongino@jaguar1.usouthal.edu)
Date: 01/23/03


From: "Jim" <jlongino@jaguar1.usouthal.edu>
Date: Thu, 23 Jan 2003 10:13:24 -0800


The following is a slighly modified copy of a post I made
to
http://www.experts-exchange.com/Operating_Systems/Win2000/Q_20460793.html
I've received no response there but hopefully someone here
will be able to help. Also included are comments and
discoveries I've made during the last week.

-------------------------------------------------------------------------

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 directory for only the
first user was 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,HomeDriveAndPath,Profile,Script,

  should be:

[User]
Username,FullName,Password,Comment,???,HomeDriveAndPath,Profile,Script

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,HomeDrive,HomePath,Profile,Script

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%3b199878

Even 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\user001,,
[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