Skip to content
Search

/etc/passwd

lastmod 2020-11-18created 2020-11-186 edits

Field descriptions

root:x:0:0:root:/root:/bin/bash
  • Field 1 : username
  • Field 2 : password (encrypted in the /etc/shadow file)
  • Field 3 : user account uid
  • Field 4 : user account gid
  • Field 5 : user account name (information)
  • Field 6 : user account home directory
  • Field 7 : user account login shell

Security: no UID '0' other than root

Only root is allowed as an account whose third field in the /etc/passwd file is 0.

## pwconv 명령으로 shadow 정책이 Enable 되어야 한다.
cat /etc/passwd | grep '^.*:x:0:'

Only the root account should be printed, as follows.

root:x:0:0:root:/root:/bin/bash

See also

author Zer0 sitemap