Creating users

  • Thread starter Thread starter Tim Herrington
  • Start date Start date
T

Tim Herrington

I am the sysadmin of a small school system. I need a way automate user
creation for the first week of school. What I'm looking for is a script
or something that run in administrator priviledge, but create power
users on the workstation. We don't have anything resembling a file
server( YET!!).

Can anyone help me?

reply via email is OK

tim
 
I am the sysadmin of a small school system. I need a way automate user
creation for the first week of school. What I'm looking for is a script
or something that run in administrator priviledge, but create power
users on the workstation. We don't have anything resembling a file
server( YET!!).

Can anyone help me?

reply via email is OK

tim


Net user
Adds or modifies user accounts or displays user account information.
net user [username [password | *] [options]]

net user username {password | *} /add [options]

net user username [/delete]

Parameters

none

Used without parameters, net user displays a list of the user accounts on the computer.

username

Specifies the name of the user account to add, delete, modify, or view. The name of the user account can have as many as 20 characters.

password

Assigns or changes a password for the user's account. A password must satisfy the minimum length set with the /minpwlen option of the net accounts command. It can have as many as 127 characters. However, if you're using Windows 2000 on a
network that also has computers using Windows 95 or Windows 98, consider using passwords not longer than 14 characters. Windows 95 and Windows 98 support passwords of up to 14 characters. If your password is longer, you may not be able to
log on to your network from those computers.

*

Produces a prompt for the password. The password is not displayed when you type it at a password prompt.

/domain

Performs the operation on the primary domain controller of the computer's primary domain.

This parameter applies only to Windows 2000 Professional computers that are members of a Windows 2000 Server domain. By default, Windows 2000 Server computers perform operations on the primary domain controller.

Note

This action is taken on the primary domain controller of the computer's primary domain. This may not be the logged-on domain.
/add

Adds a user account to the user accounts database.

/delete

Removes a user account from the user accounts database.

options

Specifies the following options:

/active:{no | yes}

Enables or disables the user account. If the user account is not active, the user cannot access resources on the computer. The default is yes (active).

/comment:"text"

Provides a descriptive comment about the user's account. This comment can have as many as 48 characters. Enclose the text in quotation marks.

/countrycode:nnn

Uses the operating-system Country/Region codes to implement the specified language files for a user's Help and error messages. A value of 0 signifies the default Country/Region code.

/expires:{date | never}

Causes the user account to expire if date is set; does not ever set a time limit on the user account. Expiration dates can be in mm/dd/yy, dd/mm/yy, or mmm,dd,yy format, depending on the Country/Region code. Note that the account expires at
the beginning of the date specified. Months can be a number, spelled out, or abbreviated with three letters. Years can be two or four numbers. Use commas or slashes to separate parts of the date (no spaces). If yy is omitted, the next
occurrence of the date (according to your computer's date and time) is assumed. For example, the following date entries are equivalent if entered between Jan. 10, 1994, and Jan. 8, 1995:

jan,9
1/9/95
january,9,1995
1/9

/fullname:"name"

Specifies a user's full name rather than a user name. Enclose the name in quotation marks.

/homedir:path

Sets the path for the user's home directory. The path must exist.

/passwordchg:{yes | no}

Specifies whether users can change their own password. The default is yes.

/passwordreq:{yes | no}

Specifies whether a user account must have a password. The default is yes.

/profilepath:[path]

Sets a path for the user's logon profile. This path points to a registry profile.

/scriptpath:path

Sets a path for the user's logon script. The path value cannot be an absolute path; path is relative to %systemroot%\System32\Repl\Import\Scripts.

/times:{times | all}

Specifies the times the user is allowed to use the computer. The times value is expressed as day[-day][,day[-day]] ,time[-time][,time[-time]], limited to 1-hour time increments. Days can be spelled out or abbreviated (M,T,W,Th,F,Sa,Su).
Hours can be 12- or 24-hour notation. For 12-hour notation, use AM, PM, or A.M., P.M. The value all means a user can always log on. A null value (blank) means a user can never log on. Separate day and time with commas, and units of day and
time with semicolons (for example, M,4AM-5PM;T,1PM-3PM). Do not use spaces when designating times.

/usercomment:"text"

Specifies that an administrator add or change the "User comment" for the account. Enclose the text in quotation marks.

/workstations:{computername[,...] | *}

Lists as many as eight workstations from which a user can log on to the network. Separate multiple entries in the list with commas. If /workstations has no list, or if the list is *, the user can log on from any computer.
........................................................................................
net localgroup "Power Users" UserName /ADD
 
Hello,

I am having trouble deleting roaming profiles from Win2K workstations. Even
when logged on as Domain Admin, the "delete" button is grayed out to me. All
profiles say they were most recently updated TOMORROW, and cannot be deleted.

Will the command line tools listed below delete cached profiles if applied
at the workstation? Or do I run a risk of damaging the profile at the server?

Help, please. Thanks!
Lisa Meharry

Jerold Schulman said:
I am the sysadmin of a small school system. I need a way automate user
creation for the first week of school. What I'm looking for is a script
or something that run in administrator priviledge, but create power
users on the workstation. We don't have anything resembling a file
server( YET!!).

Can anyone help me?

reply via email is OK

tim


Net user
Adds or modifies user accounts or displays user account information.
net user [username [password | *] [options]]

net user username {password | *} /add [options]

net user username [/delete]

Parameters

none

Used without parameters, net user displays a list of the user accounts on the computer.

username

Specifies the name of the user account to add, delete, modify, or view. The name of the user account can have as many as 20 characters.

password

Assigns or changes a password for the user's account. A password must satisfy the minimum length set with the /minpwlen option of the net accounts command. It can have as many as 127 characters. However, if you're using Windows 2000 on a
network that also has computers using Windows 95 or Windows 98, consider using passwords not longer than 14 characters. Windows 95 and Windows 98 support passwords of up to 14 characters. If your password is longer, you may not be able to
log on to your network from those computers.

*

Produces a prompt for the password. The password is not displayed when you type it at a password prompt.

/domain

Performs the operation on the primary domain controller of the computer's primary domain.

This parameter applies only to Windows 2000 Professional computers that are members of a Windows 2000 Server domain. By default, Windows 2000 Server computers perform operations on the primary domain controller.

Note

This action is taken on the primary domain controller of the computer's primary domain. This may not be the logged-on domain.
/add

Adds a user account to the user accounts database.

/delete

Removes a user account from the user accounts database.

options

Specifies the following options:

/active:{no | yes}

Enables or disables the user account. If the user account is not active, the user cannot access resources on the computer. The default is yes (active).

/comment:"text"

Provides a descriptive comment about the user's account. This comment can have as many as 48 characters. Enclose the text in quotation marks.

/countrycode:nnn

Uses the operating-system Country/Region codes to implement the specified language files for a user's Help and error messages. A value of 0 signifies the default Country/Region code.

/expires:{date | never}

Causes the user account to expire if date is set; does not ever set a time limit on the user account. Expiration dates can be in mm/dd/yy, dd/mm/yy, or mmm,dd,yy format, depending on the Country/Region code. Note that the account expires at
the beginning of the date specified. Months can be a number, spelled out, or abbreviated with three letters. Years can be two or four numbers. Use commas or slashes to separate parts of the date (no spaces). If yy is omitted, the next
occurrence of the date (according to your computer's date and time) is assumed. For example, the following date entries are equivalent if entered between Jan. 10, 1994, and Jan. 8, 1995:

jan,9
1/9/95
january,9,1995
1/9

/fullname:"name"

Specifies a user's full name rather than a user name. Enclose the name in quotation marks.

/homedir:path

Sets the path for the user's home directory. The path must exist.

/passwordchg:{yes | no}

Specifies whether users can change their own password. The default is yes.

/passwordreq:{yes | no}

Specifies whether a user account must have a password. The default is yes.

/profilepath:[path]

Sets a path for the user's logon profile. This path points to a registry profile.

/scriptpath:path

Sets a path for the user's logon script. The path value cannot be an absolute path; path is relative to %systemroot%\System32\Repl\Import\Scripts.

/times:{times | all}

Specifies the times the user is allowed to use the computer. The times value is expressed as day[-day][,day[-day]] ,time[-time][,time[-time]], limited to 1-hour time increments. Days can be spelled out or abbreviated (M,T,W,Th,F,Sa,Su).
Hours can be 12- or 24-hour notation. For 12-hour notation, use AM, PM, or A.M., P.M. The value all means a user can always log on. A null value (blank) means a user can never log on. Separate day and time with commas, and units of day and
time with semicolons (for example, M,4AM-5PM;T,1PM-3PM). Do not use spaces when designating times.

/usercomment:"text"

Specifies that an administrator add or change the "User comment" for the account. Enclose the text in quotation marks.

/workstations:{computername[,...] | *}

Lists as many as eight workstations from which a user can log on to the network. Separate multiple entries in the list with commas. If /workstations has no list, or if the list is *, the user can log on from any computer.
........................................................................................
net localgroup "Power Users" UserName /ADD
 
Back
Top