Date: Fri, 23 Oct 1998 12:12:09 +1000 From: "John Saunders" <john.saunders@scitec.com.au> To: "FreeBSD current" <freebsd-current@FreeBSD.ORG> Subject: RE: [Q]: Buildworld without secure libs (to use MD5 passwords) Message-ID: <002a01bdfe2a$89f55480$6cb611cb@saruman.scitec.com.au> In-Reply-To: <Pine.BSF.4.03.9810220900580.12898-100000@resnet.uoregon.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?002a01bdfe2a$89f55480$6cb611cb>
