Re: Login application

From: Lew Pitcher (lpitcher_at_sympatico.ca)
Date: 05/27/04


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-----



Relevant Pages

  • Re: Login application
    ... | retrieve the current login or the password file ... The first two characters of the encrypted password ... Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org ...
    (comp.os.linux.development.system)
  • AD authentication error handling
    ... I've created a login page to connect to Active Directory and retrieve a list ... If someone enters the wrong username/password, ... Anyone know how to handle this error so I can push out a login arror page? ... Set objConnection = CreateObject ...
    (microsoft.public.inetserver.asp.general)
  • Re: Timed and automatic login not longer automatic
    ... automatic login. ... I completely agree with you Stanton. ... I've had little luck with aiglx, probably due to an old radeon 7200 ... Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org ...
    (Fedora)
  • How to release or kill Mechanize session
    ... I am using scripts like the following to retrieve web data. ... Sometimes I get a login failure which may be due to the page ...
    (comp.lang.perl.misc)
  • Re: set field in web page
    ... So the first step would be to retrieve the login page ... >of the vendor, ... >fields on the page with username/password, then post this and retrieve the ... >resulting response containing the page appearing after login. ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)