Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Apr 1997 07:59:36 -0400 (EDT)
From:      Thomas David Rivers <ponds!rivers@dg-rtp.dg.com>
To:        ponds!FREEBSD.ORG!freebsd-questions, ponds!cisco.com!raj
Subject:   Re: How is passwd crypt'ed?
Message-ID:  <199704101159.HAA12773@lakes.water.net>

next in thread | raw e-mail | index | archive | help
> 
> I have a program which locks your X screen and asks for your password
> in order to unlock it.  (Yes, I know about cntrl-alt-backspace to exit
> X, and I know the program has to be setuid root in order to access the
> shadowed passwords.)  I need to know how I should call "crypt" in
> order to encrypt what the user typed so I can compare the encrypted
> password strings.  In previous versions BSD the seed was the taken as
> the first 2 characters of the encrypted password entry so you could
> simply pass the encrypted password to crypt as the second argument.  I
> tried that under FreeBSD and it doesn't seem to work.
> 
> Can someone quickly tell me how passwords are encrypted under FreeBSD?
> If no one knows right off I can do the research looking at source for
> passwd.c but I figured someone may know right off.
> 
> Thanks.
> 
> /raj
> 

 Well I certainy don't want to dampen your spirits - can I ask,
what's wrong with xlockmore in the packages?  It works great for
me...

 As far as crypt() itself the man page on it is quite helpful...
an example of using it can be found in /usr/src/usr/bin/login/login.c.

	- Dave Rivers -



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704101159.HAA12773>