1
0
mirror of synced 2026-01-20 17:38:02 +00:00
steve 3f18c15135 2006-06-20 23:19:51 by steve
When setting up the new Gentoo system allow *all* users to 'su' to root.
  This is pretty mandatory if you've copied accounts over, but root logins
 are disabled.
2006-06-20 23:19:51 +00:00

43 lines
684 B
Bash
Executable File

#!/bin/sh
#
# This script allows all users to use 'su' to become root.
#
# Steve
# --
# http://www.steve.org.uk/
prefix=$1
#
# Source our common functions
#
if [ -e /usr/lib/xen-tools/common.sh ]; then
. /usr/lib/xen-tools/common.sh
else
. ./hooks/common.sh
fi
#
# Log our start
#
logMessage Script $0 starting
#
# Remove lines matching 'group' or 'wheel'.
#
grep -v wheel ${prefix}/etc/pam.d/su > ${prefix}/etc/pam.d/su.tmp
grep -v group ${prefix}/etc/pam.d/su.tmp > ${prefix}/etc/pam.d/su
#
# Make sure permissions are correct.
#
chown root:root ${prefix}/etc/pam.d/su
chmod 600 ${prefix}/etc/pam.d/su
#
# Log our finish
#
logMessage Script $0 finished