From owner-freebsd-current Thu Oct 22 19:12:47 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA08419 for freebsd-current-outgoing; Thu, 22 Oct 1998 19:12:47 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from firewall.scitec.com.au (fgate.scitec.com.au [203.17.180.68]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA08414 for ; Thu, 22 Oct 1998 19:12:44 -0700 (PDT) (envelope-from john.saunders@scitec.com.au) Received: by firewall.scitec.com.au; id MAA23510; Fri, 23 Oct 1998 12:12:14 +1000 (EST) Received: from mailhub.scitec.com.au(203.17.180.131) by fgate.scitec.com.au via smap (3.2) id xma023508; Fri, 23 Oct 98 12:12:11 +1000 Received: from saruman (saruman.scitec.com.au [203.17.182.108]) by mailhub.scitec.com.au (8.6.12/8.6.9) with SMTP id MAA06082 for ; Fri, 23 Oct 1998 12:12:09 +1000 From: "John Saunders" To: "FreeBSD current" Subject: RE: [Q]: Buildworld without secure libs (to use MD5 passwords) Date: Fri, 23 Oct 1998 12:12:09 +1000 Message-ID: <002a01bdfe2a$89f55480$6cb611cb@saruman.scitec.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Importance: Normal Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > If you want new passwords stored in MD5 and still decrypt DES, you have to > hack passwd to pass the MD5 magic '$1$' to the crypt() routine so it > returns an MD5 key. It's a one line change; I'm highly tempted to make > it a compile-time #define in the base code. How about changing passwd check for the existance of a magic file such as /etc/create_md5_passwords. Just like adjkerntz checks for the /etc/wall_cmos_clock file. This should do it... --- /usr/src/usr.bin/passwd/local_passwd.c.orig Fri Oct 23 12:04:27 1998 +++ /usr/src/usr.bin/passwd/local_passwd.c Fri Oct 23 12:09:25 1998 @@ -162,7 +162,8 @@ #else /* Make a good size salt for algoritms that can use it. */ gettimeofday(&tv,0); - if (strncmp(pw->pw_passwd, "$1$", 3)) { + if (strncmp(pw->pw_passwd, "$1$", 3) && + access("/etc/create_md5_passwords", F_OK)) { /* DES Salt */ to64(&salt[0], random(), 3); to64(&salt[3], tv.tv_usec, 3); Also I think that if you have DES installed, a make world should build and install _both_ the libdescrypt and libscrypt libraries. My system has libscrypt libraries from 2.2.5 because it doesn't get updated with make world. Cheers. -- . +-------------------------------------------------------+ ,--_|\ | John Saunders mailto:John.Saunders@scitec.com.au | / Oz \ | SCITEC LIMITED Phone +61294289563 Fax +61294289933 | \_,--\_/ | "By the time you make ends meet, they move the ends." | v +-------------------------------------------------------+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message