User Management

Lee Painter

All of the commands here require either user.read or user.readWrite permissions, or the user should be in an Administrative role. 

Listing Users

You can list all the users currently registered with the system by issuing the command:

users


Users are printed out to the screen one user on each line.

# users
admin
lee

 

Changing a User's Password

Users can change their own password within the shell by using the passwd command with no arguments:

# passwd


The user is prompted to enter their existing password, followed by the new and a confirmation of the new password:

Current Password: *****
New Password: *****
Confirm Password: *****
Your password was changed!


Administrator's can change another users password by adding the username to the end of the passwd command:

# passwd lee
New Password: **********
Confirm Password: **********
Password for lee changed!


If you want the user to have to reset their own password at the next login, add the -f switch

passwd -f lee


Creating a User

To create a user use the create-user command. 

# create-user


You will be prompted to provide the username, full name, email address and password of the user.

Username: bob
Full Name: Bob Smith
Email Address: bob@javassh.com
Password: **********
Confirm Password: **********
Created user bob


Updating a User

You can update the email address or full name of a builtin account. To do this use the update-user command.

# update-user [options] <username>


Pass the email address with -e, or --email option

# update-user --email lee@javassh.com lee


Or change the name with -n, --name option

# update-user --name "Lee Painter" lee

 

Deleting a User

You can delete a user with the delete-user command:

# delete-user lee


You will be prompted to confirm the username you want to delete. This is to ensure you enter the correct account and confirm.

Please confirm you want to delete the account by entering the username again:


Type the username again to confirm. If entered correctly the user will be deleted.

The user lee has been deleted.