Search This Blog

Labels

adobe (1) android (3) apache (3) aviation (1) bash (2) chrome (2) composer (1) cookery (3) dev (2) dodanperks (1) extensions (1) facebook (2) firefox (1) git (2) grafana (1) guzzle (1) headaches (11) htaccess (1) html5 (2) jquery (2) lamp (1) life hacks (10) linux (28) mysqli (2) native (1) opera (2) php (10) railfanning (1) reactjs (3) reactnative (1) servers (11) sinhala (1) smartphones (2) snap (1) sound (1) tech (22) troubleshoots (4) ubuntu (29) unicode (4) virtualbox (1) wamp (2) web (11) windows (4) wordpress (3) youtube (2) කෑම (3)

Monday, 14 July 2014

Linux 5: User Management

Passwd

User details are stored in /etc/passwd file. Wikipedia link
dodan:x:1000:1000:Dodan,,,:/home/dodan:/bin/bash
It can be read as Username | Password | User ID | Group ID | Real Name and contact details | Home folder | Start-up program

Group

Locates at /etc/group
dodan:x:1001:dodan
It can be read as Group name | password (Generally password is not used, hence it is empty/blank. It can store encrypted password.) | Group ID | Users in this group

Real passwords

User passwords are really stored in /etc/shadow file encrypted in SHA.
dodan:$6$xKL4hV3x$PybQLVub4Kqe2jI2b7GG23iEYKVwujSRE0.3cP6V6u9vaOQTbxR8F0tvD.JAbTcBlpqnO2gCIZPwgIUShn1V20:16213:0:99999:7:::
It can be read as
Username | encrypted password | date of last password change | minimum password age | maximum password age


  • Date of last password change. The date of the last password change, expressed as the number of days since Jan 1, 1970
  • Minimum password age. The minimum password age is the number of days the user will have to wait before she will be allowed to change her password again.
  • Maximum password age. The maximum password age is the number of days after which the user will have to change her password.


Wikipedia article

No comments:

Post a Comment