Results 1 to 8 of 8
Thread: etc/passwd
-
06-21-2005, 04:15 PM #1Junior Guru Wannabe
- Join Date
- Oct 2004
- Posts
- 69
etc/passwd
Hello,
Im writing a root based application to work with user's passwords, i am running the latest version of CentOS, where are the encryoted passwords stored?
/etc/passwd/ only shows a list with the x
-
06-21-2005, 04:19 PM #2Web Hosting Master
- Join Date
- Nov 2004
- Location
- India
- Posts
- 1,104
Encrypted password were stored in /etc/shadow file..
AssistanZ - Beyond Boundaries...
Cloudstack Consultancy / 24x7 Web Hosting Support / 24x7 Server Management / Infrastructure Management Services
Web & Mobile Apps Development / Web Designing Services / Php, Grails, Java Development
-
06-21-2005, 07:25 PM #3Web Hosting Master
- Join Date
- Feb 2002
- Location
- Vestal, NY
- Posts
- 1,381
It is not recommended to directly edit the /etc/shadow file however.. generally you want to use the passwd utility to modify passwords or you can end up with a corrupted password file.
H4Y Technologies LLC .. Since 2001!!
"Smarter, Cheaper, Faster" - SMB, Reseller, VPS, Dedicated, Colo hosting done right.
ZERO PACKETLOSS, ZERO DOWNTIME Dedicated and Colo - USA: IA, CA, NC, OR, NV
**http://h4y.us** **http://iwfhosting.net**Voice: (866)435-5642. *** askus at host4yourself d0t com
-
06-22-2005, 11:54 AM #4Web Hosting Master
- Join Date
- May 2003
- Location
- Kirkland, WA
- Posts
- 4,448
I'm thinking he's planning on writing a utility that doesn't modify the root passwords but instead reads them (for authentication purposes). I would open the /etc/shadow as a read only file definitely.
-
06-22-2005, 08:15 PM #5Junior Guru
- Join Date
- Apr 2005
- Location
- Sweden
- Posts
- 241
For authentication he should use PAM. There should be modules/libraries for whatever language being used.
-
06-23-2005, 03:12 PM #6Junior Guru Wannabe
- Join Date
- May 2005
- Posts
- 67
I would STRONGLY second the suggestion to use PAM. Unless you REALLY REALLY know what you're doing, you have NO business directly editing/reading either /etc/passwd or /etc/shadow. If you mess up, you can cause some really bad problems.
Game control panels - control your game world your way. Server-Genie.com
http://www.server-genie.com
-
06-23-2005, 03:27 PM #7Newbie
- Join Date
- Jun 2005
- Posts
- 27
Normally the encrpted passwords are stored in the /etc/shadow file and the /etc/passwd files second field just have a reference (x) to it
Choose the right option ... The world is open for You..
-
06-23-2005, 03:31 PM #8Junior Guru
- Join Date
- Apr 2005
- Location
- Sweden
- Posts
- 241
Plus, with PAM you can easily play around with other ways of autenticating users, like ldap, nis, mysql etc. You're not limited to the standard flat file user database.