Date: Wed, 09 Apr 1997 22:30:45 -0700 From: Richard Johnson <raj@cisco.com> To: freebsd-questions@freebsd.org Subject: How is passwd crypt'ed? Message-ID: <199704100531.WAA01291@raj.cisco.com>
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704100531.WAA01291>