New local accounts are needed when a person, service owner, or automation handoff needs a separate Linux identity instead of sharing an existing login. Creating the account through the system user database keeps file ownership, shell startup files, and password policy tied to one named user.
The useradd command writes the local account records, creates the requested home directory, and assigns the chosen shell when those choices are supplied on the command line. New home directories are seeded from the system skeleton directory, so shell startup files are present before first login.
A regular local login needs an identity entry, a password, and a home directory check before handoff. Directory-backed accounts from LDAP or Active Directory and service accounts with no interactive shell usually belong in their identity provider or system-account provisioning procedure instead.
Related: How to add a user to a group in Linux
Related: How to create a new user on Ubuntu (GNOME)
Related: How to add new user in Kubuntu (KDE)
Steps to create a Linux user with useradd:
- Confirm that the login name is unused.
$ id audituser id: 'audituser': no such user
Replace audituser with the login name that should be created.
- Create the local user, home directory, matching primary group, and login shell.
$ sudo useradd --create-home --user-group --comment "Audit User" --shell /bin/bash audituser
--create-home copies skeleton files from /etc/skel, and --comment fills the account description field shown by getent passwd.
- Set the user's password interactively.
$ sudo passwd audituser New password: Retype new password: passwd: password updated successfully
Password input is hidden at the prompt. Use a temporary password only when the user can change it at first login or through a controlled handoff.
- Verify the new account identifiers.
$ id audituser uid=1001(audituser) gid=1001(audituser) groups=1001(audituser)
- Check the account database entry.
$ getent passwd audituser audituser:x:1001:1001:Audit User:/home/audituser:/bin/bash
The fields after the username show the UID, primary GID, comment, home directory, and login shell.
- Confirm that the home directory was created from the skeleton files.
$ sudo ls -la /home/audituser total 20 drwxr-x--- 2 audituser audituser 4096 Jun 13 21:23 . drwxr-xr-x 1 root root 4096 Jun 13 21:23 .. -rw-r--r-- 1 audituser audituser 220 Feb 13 12:16 .bash_logout -rw-r--r-- 1 audituser audituser 3771 Feb 13 12:16 .bashrc -rw-r--r-- 1 audituser audituser 807 Feb 13 12:16 .profile
- Check that the account has a usable password hash.
$ sudo passwd --status audituser audituser P 2026-06-13 0 99999 7 -1
The P status means a usable password hash is set. L means locked, and NP means no password hash is present.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.