Gentoo Cluster Admin Guide

Last Update: May 24, 2006 

Adding a User

To add a user, login to the master node as root and do the following:

master ~ # useradd -m <username>
(The -m creates the home folder for the user - VERY IMPORTANT!)
master ~ # passwd <username>
(Set the password for the newly created user)

master ~ # cd /var/yp
master yp # make
(This will update the NIS database with the new user)

Changing a User's Password 

After a user has been created, the user must update their password. The user should first login and execute the following command:

khash@master ~ $ yppasswd
(The user will be prompted to change the password. It is very important that the user does not use passwd!)

Using SSH Key Based Authentication

Using SSH Key Based Authentication, a user does not have to enter a password when SSHing between nodes. Start by having the user login to their account and execute the following commands:

khash@master ~ $ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/khash/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/khash/.ssh/id_dsa.
Your public key has been saved in /home/khash/.ssh/id_dsa.pub.
The key fingerprint is:
31:61:12:d0:2f:88:14:00:d3:c6:10:e0:8e:01:3e:87 khash@master
(When prompted for anything, just hit Enter. The passphrase should be empty as well.)
khash@master ~ $ cp ~/.ssh/id_dsa.pub  ~/.ssh/authorized_keys
(This will created the authorized_keys file in the shared home folder. And you're done!)

Deleting a User

Removing a user is simple. Login as root and execute the following commands:

master ~ # userdel -rf <username>
(It is important to use the -rf option in order to delete the user's home folder and files as well)
master ~ # cd /var/yp
master yp # make
(This will update the NIS database with the new settings)