1
0
mirror of synced 2026-04-16 07:56:15 +00:00

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.
This commit is contained in:
steve
2006-06-20 23:19:51 +00:00
parent bc17023d86
commit 3f18c15135

42
hooks/gentoo/20-enable-su Executable file
View File

@@ -0,0 +1,42 @@
#!/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