Verifying a User Password - calling crypt()
- From: phykell <phykell.3e10hc@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 12 Aug 2008 12:41:11 +0200
Hi,
I'm writing a function which is supposed to simply verify a username
and password against the /etc/passwd file. I'm sure I did this many
years ago by calling the encrypt() function on the the user's password
and comparing the result with the corresponding one read from
/etc/passwd. I recall that the encrypt function required a salt value
which was the password read from the /etc/passwd.
I'm calling encrypt() with the user's password as the salt and I'm
getting back a different password as the result. I've even tried using
the first two characters of the user's password as the salt but to no
avail.
I'm using AIX version 5.
Can anyone explain this or suggest some suitable code that will do the
job?
Thanks :)
--
phykell
------------------------------------------------------------------------
phykell's Profile: http://fantasticunix.com/forum/member.php?userid=69
View this thread: http://fantasticunix.com/forum/showthread.php?t=508894
.
- Follow-Ups:
- Re: Verifying a User Password - calling crypt()
- From: ta0kira
- Re: Verifying a User Password - calling crypt()
- From: Marc
- Re: Verifying a User Password - calling crypt()
- Prev by Date: Re: Ascii to binary translator, has any one heard this?
- Next by Date: Re: headerfiles and make?
- Previous by thread: Where do c source and header files live?
- Next by thread: Re: Verifying a User Password - calling crypt()
- Index(es):
Relevant Pages
|