Linux - /etc/passwd (public user information)

About

/etc/passwd is the text file that contains public user account information

The name is a little bit misleading because the password is no more present (replaced with a X) as this file is used by many application to lookup user information such as file ownerships with ls

The passwords and other sensitive information are know stored in the shadow file.

It's used by the the PAM module. See:

Format

Format of the file is:

  • User (name normally all lower case)
  • Password (only contains the letter 'x' as the password has moved to the shadow file)
  • User ID (a unique number of each user)
  • Primary Group ID
  • Comment (Normally the person's full name)
  • Home directory (normally /home/<user name>
  • Default shell (normally /bin/bash)

Each field is separated by a colon.

cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
...............
gerardnico:x:500:500:Nicolas GERARD:/home/gerardnico:/bin/bash
applvis:x:501:501::/home/applvis:/bin/bash
oravis:x:502:501::/home/oravis:/bin/bash

Documentation / Reference





Discover More
Email - Mail User Agent (MUA) - Mail Client

A Mail User Agent (MUA) is the technical term from a email client application. User agentMail User Agent (MUA)user applicationuser agent on the web A MUA can: read and write in the mailbox and...
Linux - /etc/shadow (Secure user information)

/etc/shadow is a text file that contains secure user information such as: password. and account expiration information The public user information are stored in the /etc/passwd file. The shadow...
Pam Auth Update
Linux - PAM (Pluggable Authentication Modules)

Pluggable Authentication Modules The Syntax of each rule is a space separated collection of tokens, the first three being...
Linux - User (Uid)

Every user who has access to a Linux system needs a login and a password. The root login is the super admin user. The term root may refer to: the root account (the superuser, who has permission...
Bash Liste Des Attaques Ovh
Linux Utility - Crontab (Cron) Scheduler

The cron is a scheduler daemon that gets its data from crontab files where each users have their own crontab. Crontab is the command line application that is used to install, deinstall or list the...



Share this page:
Follow us:
Task Runner