[Q] How to detect if shadow passwords are installed ?
The xlockmore package, I've been told, should not be setuid root. However,
for shadow passwords, it needs to setgid shadow. I therefore contemplate
releasing xlock in as root.root in mode 0755, and if shadow is detected,
change to root.shadow 2755. As shadow does exist as a group on non-shadow
systems, this seems the only way to handle this.
But how do I detect whether a system using shadow'ed passwords? Would this
work as a postinst:
#! /bin/sh
set -e
case "$1" in
configure)
if [ -f /etc/shadow ]
echo "Preparing xlockmore for shadow passwords ..."
chgrp shadow /usr/bin/X11/xlock
chmod 2755 /usr/bin/X11/xlock
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
;;
esac
exit 0
If so, a problem remains that if someone has xlock installed on a non-shadow
system, and then switches to shadow, xlock will be broken. Guess that will be
another bug ...
--
Dirk Eddelb"uttel edd@poboxes.com http://www.netforward.com/poboxes/?edd
Reply to: