Adding and removing users

Be root. To add a new user named Laila Sara with laila as the user name, do the following: You will need nnnnn, the next free uid number, the numbers start with 10000 for trond. Check out the next number by typing "less /etc/passwd":

Then write the following command. It shall be written in one line, but is here written on multiple lines for readability.

adduser
-u nnnnn 
-G cvs 
-c "Laila Sara, Samisk inst." 
-s /bin/bash laila

The user must own her own catalogue. This is achieved by writing:

chown laila:laila /home/laila

Then assign the new user a password, by writing:

passwd laila

Remember to copy the .bashrc, .bash_profile and .emacs files to the laila account while you are still a root user. Remember to run the initial "cvs get" command.

If the user has forgot his/her own password, log in as root, and enter the command "passwd laila". You will not be prompted for the old password, and the new one you enters will erase the old one.

Removing users

For removing (in this example the user laila), be root, and use this command (-r removes the files of the user al well):

/usr/sbin/userdel -r laila
rm -r /export/home/laila
cd /var/yp
make 
A general warning: The commands that the manuals say should work, do work, if you just write /sbin/ in front of them, i.e. prbably /sbin/userdel instead of userdel.


Last modified: Fri Nov 26 15:50:23 2004