Welcome to Server Circle. It's a friendly site and all levels of experience are welcome. Be aware that we use cookies for your login.
Server Circle - Ask questions about Servers and get answers from experts.
Beta (0.03 sec)
Username and hashed password from passwd file

How can I extract just those columns from /etc/passwd ?
Asked by:
ubuntuhelp
814 points
 Report Abuse
 Share Page - Category: Linux Servers - Tags: Username and hashed password from passwd file
 Enter your response
Please use Pastie.org to paste lengthy code or to fix formatting issues with code
  • Responses in reverse (2)

Best Answer

Passwd file has not hashed password [Field 2 of /etc/psswd is * ]

you can use

cut -f1 -d: /etc/passwd # for extract userid

cut -f2 -d: /etc/shadow # for extract hashed passwd

you can use "pwunconv" to creates passwd from passwd and

shadow and then removes shadow but for security reason

i don't like this way...

you can extract by:

cut -f1,2 -d: /etc/passwd # after execution unconv[Not Recommended]

Response by:
jalal
3623 points
You can type this

cut -fX -d":" /etc/passwd

X=filed you need

Response by:
mohamad_kian
1548 points


  • Related Questions
About Us : Contact Us : Etiquette : Terms : CDN Failover : ShorterURL : CDN Fallback : © 2013 Server Circle