Previous Topic: chres Command—Modify Windows ResourcesNext Topic: editfile Command—Modify Windows File Settings


chusr Command—Modify Windows Users

Valid in the native Windows environment

Use the chgusr, editusr, and newusr commands to work with Windows users. These commands are identical in structure and only vary in the following way:

Note: This command also exists in the AC environment but operates differently.

This command has the following format:

{{chusr|cu}|{editusr|eu}|{newusr|nu}} userName \
[comment(string)|comment‑] \
[country(string)] \
[expire|expire(mm/dd/yy[@hh:mm])|expire‑] \
[flags{(accountFlags)|‑(accountFlags)}] \
[full_name(fullName)] \
[homedir(homeDir)] \
[homedrive(homeDrive)] \
[location(string)] \
[logonserver(serverName)] \
[organization(name)] \
[org_unit(name)] \
[password(password)] \
[pgroup(primaryGroup)] \
[phone(string)] \
[privileges(privList)] \
[profile(path)] \
[restrictions( \
days({[mon] [tue] [wed] [thu] [fri] [sat] [sun]}|anyday|weekdays) \
time(startTime:endTime|anytime))]\
[restrictions‑] \
[resume[(date)]|resume‑} \
[script(logonScriptPath)] \
[suspend[(date)] | suspend‑] \
[terminals(terminalList)|terminals‑(terminalList)] \
[workstations(workstationList)|workstations‑(workstationList)|workstations-]
comment(string)|comment-

Assigns a comment string to the user record.

The argument is an alphanumeric string of up to 255 characters. If the string contains any blanks, enclose the entire string in single quotation marks.

country(string)

Specifies the country where the user is located. This string is not used during the authorization process.

The argument is an alphanumeric string of up to 19 characters. If the string contains any blanks, enclose the entire string in single quotation marks.

expire|expire(mm/dd/yy[@hh:mm) | expire‑

Sets the date on which the user's account expires. If a date is not specified, the user account expires immediately, provided the user is not currently logged in. If the user is logged in, the account expires when the user logs out.

expire‑ with the newusr command defines a user account that does not have an expiration date. For the chusr and editusr commands, it removes an expiration date from the specified user account.

The date argument takes the format: mm/dd/yy [@hh:mm].

flags(accountFlags|- accountFlags)

Specifies particular attributes of a user's account. See the appendix “Windows Values” for a list of valid flag values.

To remove flags from the user record, precede accountFlags with a minus (-).

full_name(fullName)

Specifies the full name of the user associated with the user record.

The argument is an alphanumeric string of up to 256 characters. If the string contains any blanks, enclose the entire string in single quotation marks.

gecos(string)

Specifies a comment string for the user, such as the user's full name. Enclose the string in single quotation marks.

homedir(homeDir)

Specifies the user's home directory. Users log in automatically to their own home drives and home directories.

homedrive(homeDrive)

Specifies the drive of the user's home directory. Users log in automatically to their own home drives and home directories.

location(string)

Specifies the user's location. This string is not used during the authorization process.

The argument is an alphanumeric string of up to 19 characters. If the string contains any blanks, enclose the entire string in single quotation marks.

logonserver(serverName)

Specifies the server that verifies the login information for the user. When the user logs in to the domain workstation, CA ControlMinder transfers the login information to the server, which gives the workstation permission for the user to work.

organization(name)

Specifies the organization in which the user works. This information is not used during the authorization process.

The argument is an alphanumeric string of up to 256 characters. If the string contains any blanks, enclose the entire string in single quotation marks.

org_unit(name)

Specifies the organizational unit in which the user works. This information is not used during the authorization process.

The argument is an alphanumeric string of up to 256 characters. If the string contains any blanks, enclose the entire string in single quotation marks.

password(password)

Assigns a password to a user. If password checking is enabled, the password is valid for one login only. When the user next logs in to the system, a new password must be set.

The argument is a string of up to 14 characters, and cannot include either a space or a comma. If password checking is enabled, the password is valid for one login only. When the user next logs in to the system, the user must set a new password, unless you set the flag for “Password Never Expires”.

To change your own password, you need to set selang options using setoptions cng_ownpwd or use sepass.

If you are setting passwords for users on Windows NT systems, the following message may appear:

The password is shorter than required.

This error means that the password does not meet the policy requirements. This is caused by any of the following:

To avoid this error, make sure you set a password which meets all applicable requirements.

pgroup(primaryGroup)

Sets the user's primary group ID. A primary group is one of the groups in which a user is defined and must be a Global group.

The argument is a string of up to 14 characters, and cannot include either a space or a comma.

phone(string)

Specifies the user's phone number. This information is not used during the authorization process.

privileges(privList)

Adds specific rights to the Windows user record or, when privList is preceded by a minus sign (-), removes the specified rights. You can specify this parameter only with the chusr or editusr command, and only when you are changing an existing user record. You cannot use it to assign privileges when you are creating a new user record.

profile(path)

Specifies the full path location of the file that contains a user's profile for the Desktop environment (program groups, network connections). Every time the user logs in to any workstation, the same environment appears on the screen.

restrictions([days] [time])|restrictions‑([days] [time])

Specifies the days of the week and the hours in the day when users may access the file.

If you omit the days argument and specify the time argument, the time restriction applies to any day‑of‑week restriction already indicated in the record. If you omit time and specify days, the day restriction applies to any time restriction already indicated in the record. If you specify both days and time, the users may access the system only during the specified time period on the specified days.

resume(date)|resume‑

The date, and optionally time, at which Windows will reinstate the user account. If you specify both the suspend parameter and the resume parameter, make sure the resume date falls after the suspend date or the user will stay suspended indefinitely.

Enter a date, and optional time, in the following format:

mm/dd/yy[@HH:MM]

Use resume- parameter to change the status of the user account from active (enabled) to suspended. Use this parameter with the chusr or editusr commands only.

script(loginScriptPath)

Specifies the location of a file that runs automatically when the user logs in. This login script configures the working environment. This parameter is optional, since the profile parameter also sets up the user's working environment.

suspend(date)|suspend‑

Disables a user account. A user cannot use a suspended user account to log in to the system. If you specify date, Windows suspends the user account on the specified date. If you omit a date, Windows suspends the user account immediately upon execution of the chusr command.

Enter a date, and optional time, in the following format: mm/dd/yy[@HH:MM].

Use the suspend‑ parameter to change the status of the user account from disabled to active (enabled). Use this parameter with the chusr or editusr commands only.

terminals(terminalList)|terminals‑(terminalList)

Specifies up to eight terminals from which the user can log in. Surround the list with quotation marks, and separate the names with commas. For example:

“terminal1,terminal2”
workstations(workstationList)|workstations-(workstationList)|workstations-

Specifies up to eight workstations from which the user can log in. Surround the list with quotation marks, and separate the names with commas. For example:

“workstation1,workstation2”