The Steps to Creating a User Account

The tools that different Linux distributions offer to simplify the process of adding a user account may vary, but all of the tools ask for essentially the same information because the underlying process of adding a user account is the same on all Linux systems. Adding a user account requires the following steps:

1. Edit the /etc/passwd file to define the username, UID, GID, home directory, and login shell for the user.

2. Run a tool, such as passwd, to create an encrypted password for the user.

3. Run mkdir to create the user's new home directory.

4. Copy the default initialization files from /etc/skel to the user's home directory. The /etc/skel directory holds files such as .bashrc, which is used to initialize the bash environment. A Linux system comes with a selection of files already in /etc/skel. To provide additional or different initialization files for your users, simply add files to the /etc/skel directory, or edit the files that you find there.

5. Change the ownership of the user's home directory and the files it contains so that the user has full access to all of her files. For example, chown -r kathy:users


Most of these steps involve building the user's home directory. However, much of the information about the user account is stored in the /etc/passwd file.

Was this article helpful?

0 0

Post a comment