how do i access the password file under unix

From WebHostingNeeds.com
Jump to: navigation, search

In standard Unix the password file is /etc/passwd. On a Unix system with either NIS/yp or password shadowing, much of the password data may be elsewhere. An entry in the password file consists of seven colon delimited fields:


Username
Encrypted password (And optional password aging data)
User number
Group Number
GECOS Information
Home directory
Shell

Sample entry from /etc/passwd:

flashwebhost:x:500:501::/home/web/ftp:/bin/bash


Broken down, this passwd file line shows:

          Username: flashwebhost
   Shadow Password: x
       User number: 500
      Group Number: 501
 GECOS Information: 
    Home directory: /home/web/ftp
             Shell: /bin/bash