FreeBSD auth

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Thu Nov 3 04:09:42 PST 2005


Dan Toganel <dantoganelus at yahoo.com> writes:

> --- Igor Robul <igorr at speechpro.com> wrote:
> 
> > It is not recommended directly use /etc/passwd, you
> > your program need 
> > authentification, then use
> > PAM (man 3 pam). If you still want ignore PAM, you
> > can use getpwent(3) 
> > family of functions.
> >
> Thanks for your interest.
> Well, the problem with getpwent() is that i can't 
> retrive hash from master.passwd, 
> I can use it, only to parse passwd file.
> But i also need to parse master.passwd to obtain 
> the hash and to crypt user password and obtain 
> the hash.
> I need more specific help about those two.

getpwent() *does* give you the encrypted password.
It's the second field in the structure passed back.


More information about the freebsd-questions mailing list