Edit user information

The program chpass can be used to edit further user information. A superuser (root) has extended rights and can edit more fields than other users.

A superuser (root) can change the standard personal settings, the home directory, the Uid, Gid and the login name. In addition, security settings can be implemented by using Change to set the time for password changes or Expire to set an expiration time for the user account.

#Changing user information for NewUser.
Login: NewUser
Password: $6$q1X1/ZB/NGu9ulrF$.JYhoCPsGT6hk0GD34oJYWwOKGxY67ka818lpy/0HY.7XvXK69
JdeYOtMkNJNQvqBTTfblYBQ3SZ.MYxChPeQ1
Uid [#]: 1002
Gid [# or name]: 1002
Change [month day year]:
Expire [month day year]:
Class:
Home directory: /home/NewUser

A standard user account can edit the first and last name, the shell and the contact information.

#Changing user information for NewUser.
Shell: /bin/tcsh
Full Name: John Doe
Office Location:
Office Phone:
Home Phone:
Other information:

Edit user information as follows:

1. Enter the command chpass NewUser in the console. Or enter doas chpass NewUser if you want to edit the information as superuser (root).
2. Use the arrow keys to navigate to the line you want to edit.
3. Press [Esc] to switch the editor to command mode.
4. Delete preset values with [x].
5. Press [i] to add new text to the cursor.
6. Press [Esc] and type :wq in the console to save the changes and exit the editor. Or type q! to exit the editor without saving.
Afterwards, a message is issued to indicate that all changes have been saved successfully. If the entries are incorrect, an error message is displayed with a reference to the location.
/etc/pw.6RnflE: 15 lines, 412 characters.
chpass: upper-case letters are dangerous in a login name
chpass: user information updated
Administrator@CX-3B151A:~ %