Member Support ~ Linux Admin User Guide ~ Add/Remove User


Adding User
To Create a new user, using the command "useradd".

# useradd -d /home/martin -g staff martin 



Execute the above command will create a new user called "martin" with home directory /home/martin.

#passwd martin

Submit the initial password for user martin


Adding Group

# groupadd staff

Create a new group called "staff"


Deleting User

# userdel -r martin

Remove a user called
martin and all files under the user's home directory


Deleting Group 

# groupdel staff


Remove a group called
staff and all files under the user's home directory



Modify a User account

# usermod martin -g newstaff -d /home3/mar

Modify the user's group and home directory.

Room 1619, Fortune Commercial Building, 362 Sha Tsui Road, Tsuen Wan, N.T.
Tel: (852) 2409-8602    Fax: (852) 2408-8632    E-mail: info@unisite.net