From owner-freebsd-questions Wed Jul 14 5:10:46 1999 Delivered-To: freebsd-questions@freebsd.org Received: from mailhost.criterion.canon.co.uk (mailhost.criterion.canon.co.uk [194.223.249.254]) by hub.freebsd.org (Postfix) with ESMTP id D001F14BCD for ; Wed, 14 Jul 1999 05:10:38 -0700 (PDT) (envelope-from adamn@csl.com) Received: from csl.com (hermes.criterion.canon.co.uk [194.223.249.13]) by mailhost.criterion.canon.co.uk (8.8.8/8.7.3) with ESMTP id NAA15589 for ; Wed, 14 Jul 1999 13:01:20 +0100 (BST) Message-ID: <378C7B27.AA43AF2F@csl.com> Date: Wed, 14 Jul 1999 12:57:27 +0100 From: Adam Nealis Organization: Criterion Software, Ltd. X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.0.34 i686) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-questions Subject: How to use "traditional crypt" Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 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