How exactly do you use crypt to authenticate users?
by Jamie Ramone from LinuxQuestions.org on (#53ET7)
Reading through the code of the login command of V7 UNIX, crypt is called in the following fashion:
Code:namep = crypt(getpass("Password:"),pwd->pw_passwd);where it uses the whole stored password as the salt. But if I try this on my custom , non-shadow, non-pam, LFS system it segfaults. Why is that? I already verified that pwd is not NULL, and the password is itself (i.e. the first parameter I'm passing to crypt) is also non-NULL.
Any help is greatly appreciated.


Code:namep = crypt(getpass("Password:"),pwd->pw_passwd);where it uses the whole stored password as the salt. But if I try this on my custom , non-shadow, non-pam, LFS system it segfaults. Why is that? I already verified that pwd is not NULL, and the password is itself (i.e. the first parameter I'm passing to crypt) is also non-NULL.
Any help is greatly appreciated.