[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:
case "$1" in
if [ -f /etc/shadow ]
echo "Preparing xlockmore for shadow passwords ..."
chgrp shadow /usr/bin/X11/xlock
chmod 2755 /usr/bin/X11/xlock
echo "postinst called with unknown argument \`$1'" >&2
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 firstname.lastname@example.org http://www.netforward.com/poboxes/?edd