Creating a user account

When you installed Red Hat Linux you were given the opportunity to create user accounts. If you did not create at least one (not including the root account) you should do so now. Working in root when you do not absolutely have to is a bad idea.

There are two ways to create new and/or additional user accounts: from a GUI, using the user configuration tool; and from a shell prompt.

Figure 1-5. The User Configuration Tool

To create a user account from a GUI:

  1. Log in. If you only have a root account, you must log in as root. If you are already logged in to a user account and want to create more accounts, you do not have to change to root; you will be prompted for the root password later.

  2. In GNOME, click on the Start Here button on the panel at the bottom of your desktop. In the new window that opens, click on the System Settings icon and then on the icon for the user configuration tool (if you are not logged in as root, you will be prompted to enter the root password). In KDE, go to Main Menu => System => User Manager.

  3. When the configuration tool opens (Figure 1-5), click on New User.

  4. Fill in the user name (this can be an abbreviation or some sort of nickname), the full name of the user for whom this account is being created, and a password (which you will enter a second time for verification). The name of this user's home directory and the name of the login shell should appear by default.

  5. Click on OK. The user account creation is complete.

To create a user account from a shell prompt:

  1. Open a terminal and log in as root.

  2. Type useradd followed by a space and the username for the new account you are creating at the command line (for example, useradd beth. Press [Enter].

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

  4. The shell prompt should display New UNIX password. This is asking you to enter a password for the new account. Type the password you want to apply to this account and press [Enter].

  5. You will be asked to enter the password again for confirmation. Then 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 do not 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."

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.