Re: Login application
From: Lew Pitcher (lpitcher_at_sympatico.ca)
Date: 05/27/04
- Next message: Kasper Dupont: "Re: Login application"
- Previous message: Otto Wyss: "Login application"
- In reply to: Otto Wyss: "Login application"
- Next in thread: Kasper Dupont: "Re: Login application"
- Reply: Kasper Dupont: "Re: Login application"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 26 May 2004 21:05:39 -0400
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Otto Wyss wrote:
| I'm writing my own login application and have figured out how to
| retrieve the current login (getlogin) or the password file (getpwent)
| but I haven't found well the rest. ;-) Could anyone give me some hints
| for names I can look up?
You've almost got everything you need for classical passwords (/etc/passwd
passwords). You're missing crypt(3) and strcmp(3). See passwd(5) for some details.
The first two characters of the encrypted password (retrieved by getpwent()
are the crypt(3) 'salt' used to create the encrypted password.
Shadow passwords (/etc/shadow) are different. If the classical password is a
single byte string "x", then you'll want shadow(5) and getspent(3)
Finally, if you're using PAM, then I can't help you at all.
- --
Lew Pitcher
Master Codewright & JOAT-in-training | GPG public key available on request
Registered Linux User #112576 (http://counter.li.org/)
Slackware - Because I know what I'm doing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFAtT7jagVFX4UWr64RAjerAJ9b8jHx53D1ZJyJ4lKjxSn0g0OJiACgjpja
JFNTK3jD2RHCz3dCFuLBqHE=
=36Ti
-----END PGP SIGNATURE-----
- Next message: Kasper Dupont: "Re: Login application"
- Previous message: Otto Wyss: "Login application"
- In reply to: Otto Wyss: "Login application"
- Next in thread: Kasper Dupont: "Re: Login application"
- Reply: Kasper Dupont: "Re: Login application"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|