Creating a user account

When you installed Red Hat Linux, you were asked to create a root password — a password for the root account, which is used by the system administrator. At that time, you were also able to create additional user accounts.

If you did not create a user account during the installation, this should be your first task. There are two ways to do this: from a GUI (using linuxconf) and from a shell prompt.

To create a user account from a GUI:

  1. Log in from the console or from a graphical screen.

  2. Open a terminal window. In GNOME and KDE you can click on the Terminal Emulation icon on the panel at the bottom of the desktop. If you are working without a GUI, you are already at a shell prompt.

  3. Type su - at the command line and press [Enter] to log in as root. You will then be asked to enter the root password.

  4. Type linuxconf at the command line and press [Enter]. You will get a help screen the first time you open linuxconf. Click on Quit to see the linuxconf screen.

  5. Click on the + next to Users Accounts to expand this menu.

  6. Click on the + next to Normal.

  7. Click on User Accounts.

  8. In the Users Accounts window that appears on the right, click on Add.

  9. Fill in the login name you want this user to have and the user's full name in the appropriate fields. Every account belongs to at least one group. Groups are used to determine file access permissions. The default group for a user account will be the same as the login name.

  10. Fill in any other fields you choose to and click on Accept.

  11. Enter a password for the new user (read on in this chapter for more on selecting user names and passwords). You will be asked to re-enter it for confirmation.

The new user should now appear in the list of users. You can delete accounts in linuxconf by selecting a user from the User Accounts list and then clicking on the Del button. To edit account info, select an account from the User Accounts list, change the fields you want to, and click on Act/Changes.

For more information on advanced linuxconf functions, click on the Help buttons in linuxconf.

To create a user account from a shell prompt:

  1. At the shell prompt, log in as root.

  2. Type useradd followed by a space and the username for the new account at the command line and press [Enter].

  3. Now type passwd followed by a space and the username again.

  4. The shell prompt should display New UNIX password. This is asking you to type the password for the new account.

  5. Type the password again for confirmation. You will see the following message, indicating that the new account has been created:

passwd: all authentication tokens updated successfully

TipChoosing Account Names
 

Often, user accounts are just variations on the user's name, such as jsmith for John Smith. User account names can be anything from your name, initials, or birthday to something more creative.

NoteWhat is a Secure Password?
 

You can be fancy or plain when you pick a user account name, but take precautions when you choose a password. The password is the key to your account, so it should be both unique and easy for you to remember. Your password should be at least six characters (actually, it can be 256 characters long if you enabled MD5 passwords during the installation, though you probably don't need that many). You can mix upper- and lowercase letters, as well as numbers and characters. Avoid easy selections, such as "qwerty" or "password." If you want to pick an easy-to-remember but somewhat unique password, consider a variation of a word, such as "a!rPl8nE" for "airplane." If you need more information about passwords, see Chapter 10.

You can exit from a terminal window by clicking the X button on the upper right corner of the window, or by typing exit at the prompt.

NoteForgot Your Password?
 

See (the section called Forgotten Password in Chapter 13) for information on what to do if you forget your root or user account password.