Date: Wed, 14 Jul 1999 12:57:27 +0100 From: Adam Nealis <adamn@csl.com> To: freebsd-questions <freebsd-questions@FreeBSD.ORG> Subject: How to use "traditional crypt" Message-ID: <378C7B27.AA43AF2F@csl.com>
next in thread | raw e-mail | index | archive | help
I have a FreeBSD box with 2.2.7-STABLE on it, and non-traditional encryption installed: ls -l /usr/lib/libcrypt* lrwxrwxrwx 1 root bin 11 Oct 13 1998 /usr/lib/libcrypt.a -> libscrypt.a lrwxrwxrwx 1 root bin 16 Oct 13 1998 /usr/lib/libcrypt.so.2.0 -> libscrypt.so.2.0 lrwxrwxrwx 1 root bin 15 Oct 14 1998 /usr/lib/libcrypt_p.a -> libdescrypt_p.a For a resaon to do with some web authentication on an offsite server we have bought space on, I have a need to generate encrypted passwords in traditional, 13 character UNIX style. At present, a short C stub, when compiled and run with bash-2.01# cc pw.c -lcrypt bash-2.01# ./a.out $1$_pa$DxOQFT8SEpBphLqHX/W4g1 is spitting out 32 character passwords. #include <stdio.h> main() { const char *key = "password"; const char *setting = "_pa"; printf ("%s\n", crypt(key, setting)); } man 3 crypt mentions "Traditional crypt", but I don't seem to be able to use crypt in traditional fashion as things are. Presumably I just need to find a copy of the trad UNIX crypt.a libraries and link against those? Thanks, Adam. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?378C7B27.AA43AF2F>