Date: Wed, 8 Mar 2000 15:34:58 -0600 (CST) From: Visigoth <visigoth@telemere.net> To: freebsd-current@freebsd.org Subject: /etc/periodic/daily/200.backup-passwd and MD5 Message-ID: <Pine.BSF.4.21.0003081523440.16144-200000@www.telemere.net>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
All flames welcome as a learning experience.... ;-)
I am currently running a -current on a group of machines where I
work. I decided to use the MD5 libscrypt passwords, and noticed something
strange in the daily output e-mail. When the MD5 passwords are used the
daily output e-mail fails to truncate the encrypted passwd from the
/etc/master.passwd file before e-mailing out the diffs. This is the case
even on a machine which was built today. I haven't seen any info on
-current about it so I thought I would bring it up.
I also wrote and attached small patch to take care of the issue in
the short term. all it does is change:
diff $bak/master.passwd.bak /etc/master.passwd |\
sed 's/^\([<>] [^:]*\):[^:]*:/\1:(password):/'
to:
diff $bak/master.passwd.bak /etc/master.passwd |\
sed 's/^\([^:]*\):[^:]*:/\1:(password):/'
My logic could be messed up, so if there are any issues that I
overlooked in the patch I would love to hear about them. I thought it
might be a good thing to take care of quick before -RELEASE (yea!)
Thanks all...
Damieon Stark
visigoth@telemere.net
[-- Attachment #2 --]
*** /var/backups/200.backup-passwd Mon Feb 21 09:19:00 2000
--- /etc/periodic/daily/200.backup-passwd Mon Feb 21 09:19:28 2000
***************
*** 16,22 ****
if cmp -s $bak/master.passwd.bak /etc/master.passwd; then :; else
echo "$host passwd diffs:"
diff -u $bak/master.passwd.bak /etc/master.passwd |\
! sed 's/^\([<>] [^:]*\):[^:]*:/\1:(password):/'
mv $bak/master.passwd.bak $bak/master.passwd.bak2
cp -p /etc/master.passwd $bak/master.passwd.bak
fi
--- 16,22 ----
if cmp -s $bak/master.passwd.bak /etc/master.passwd; then :; else
echo "$host passwd diffs:"
diff -u $bak/master.passwd.bak /etc/master.passwd |\
! sed 's/^\([^:]*\):[^:]*:/\1:(password):/'
mv $bak/master.passwd.bak $bak/master.passwd.bak2
cp -p /etc/master.passwd $bak/master.passwd.bak
fi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0003081523440.16144-200000>
