Create users in a Soperator cluster so they can connect to the cluster nodes.
A Soperator cluster uses the Ubuntu user management tools, so user administration on Soperator is similar to user administration on Ubuntu. The general difference is that you create users with the soperator-createuser command, Soperator’s wrapper over Ubuntu’s adduser command.
Every Soperator cluster has a default administrator called root. To manage users, connect to cluster nodes as root.
Only users with administrator privileges can create and delete other users. If you are not the root user, run the creation and deletion commands with sudo.
How to create a user
-
Ask a user to provide you with an SSH public key. They will use this key for connections.
-
Connect to a login node.
-
Run the user creation command and specify a new username:
soperator-createuser <username> [--with-password] [--without-sudo] [--without-docker]
You can add optional parameters. The soperator-createuser command supports the same parameters as adduser and has several parameters of its own:
-
--with-password: Requires a password for the new user, in addition to their SSH key.
-
--without-sudo: Disables the default option to run commands with sudo for the user.
-
--without-docker: Disables the default option to run docker commands without sudo for the user.
By default, soperator-createuser adds the user to the Unix docker group, which allows running docker commands without sudo. You can disable this by using the --without-docker parameter. For more information about the group, see the Docker documentation.
-
At the prompt that appears, enter the following information:
- Password of the user, if you specified the
--with-password parameter.
- Optional full name of the user. We recommend specifying it, especially if the username does not match the full name. This helps you recognize the user.
- Additional optional information, such as their room number or work phone.
- SSH public key of the user.
How to get a list of users
-
Connect to a login node.
-
Run the user list command:
Output example:
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
...
test-user-1:x:1004:1004:Test User Name,,,:/home/test-user-1:/bin/bash
System users have IDs that are less than 1000. Regular users have IDs that are larger than or equal to 1000. In the example above, the system bin user has the ID 2 and the regular test-user-1 user has the ID 1004.
How to delete a user
-
Connect to a login node.
-
To copy the username, get the list of users.
-
Run the user deletion command:
deluser <username> --remove-home
The command deletes the user and its home directory.
Output example:
Looking for files to backup/remove ...
Removing files ...
Removing user `test-user-1' ...
Warning: group `test-user-1' has no more members.
Done.
For more information about deleting users by using deluser, see the Ubuntu documentation.