In Linux, new user accounts automatically receive mail accounts. Here are the steps for adding a new user account in Red Hat Enterprise Linux 5 or 6 and its derivative CentOS 5 or 6.

Manage User and Group Accounts (GUI)

This section describes how to use the User Manager to manage the user and group accounts.

User Manager1. Click System then select Administration and click Users and Groups. This will launch the User Manager window.
User Manager2. Specify the password for root when asked.
User Manager3. In the User Manager window, click Add User. This will show the Create New User window.
Create New User4. In the Create New User window, fill in the User Name, Full Name, Password and Confirm Password. Click Ok when you’re done.
ImportantTo avoid user account related problems, do not use uppercase letters when creating user names.
User Manager5. That’s it, you have just created a new user. To remove a user, select the user you want to remove and click Delete.

Manage User and Group Accounts (Console)

Below are the console commands to manage the user and group accounts. These requires root level access. Type in any of the commands below without any parameters to see that command’s help information.

  • /usr/sbin/useradd [options] login_name
    creates a new user
  • /usr/sbin/usermod [options] login_name
    modifies a user’s attributes
  • /usr/sbin/userdel [options] login_name
    deletes the specified user. Use the -r option to automatically remove the user’s home directory and mail spool.
  • /usr/bin/passwd login_name
    sets the password for the specified user
  • /usr/sbin/groupadd [options] group_name
    creates a new group
  • /usr/sbin/groupmod [options] group_name
    modifies a group’s attributes
  • /usr/sbin/groupdel group_name
    deletes the specified group

Related Pages

 

Visit the forum to ask for help or to give a comment.

***
Posted on 4/23/2007 and last updated on 9/17/2011
Filed under CentOS 5 , CentOS 6 , Red Hat Enterprise Linux 5 , Red Hat Enterprise Linux 6 , System Administration