From d65152b69434b2bcd8b367d0fc21ad869f3c2e79 Mon Sep 17 00:00:00 2001 From: Sebastian Schmelzer Date: Wed, 3 Jun 2009 12:20:27 +0000 Subject: fix problems with useradd if pam is (partly) configured with ldap git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@2914 95ad53e4-c205-0410-b2fa-d234c58c8868 --- os-plugins/plugins/kiosk/XX_kiosk.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'os-plugins') diff --git a/os-plugins/plugins/kiosk/XX_kiosk.sh b/os-plugins/plugins/kiosk/XX_kiosk.sh index 4e3bc91f..c7e275ad 100644 --- a/os-plugins/plugins/kiosk/XX_kiosk.sh +++ b/os-plugins/plugins/kiosk/XX_kiosk.sh @@ -25,6 +25,12 @@ if [ -e /initramfs/plugin-conf/kiosk.conf ]; then profile_path="/etc/opt/openslx/plugins/kiosk/profiles/" + # avoid ldap conflicts - part I + # hide nsswitch.conf + if [ -e /mnt/etc/nsswitch.conf ]; then + mv /mnt/etc/nsswitch.conf /mnt/etc/nsswitch.conf.bak + fi + if [ -e /mnt/$profile_path/$kiosk_profile/ ]; then # create new user chroot /mnt useradd -s /bin/bash -k $profile_path/$kiosk_profile/ -m kiosk @@ -32,6 +38,12 @@ if [ -e /initramfs/plugin-conf/kiosk.conf ]; then else chroot /mnt useradd -s /bin/bash -k $profile_path/plain/ -m kiosk fi + + # avoid ldap conflicts - part II + # restore old nsswitch setup + if [ -e /mnt/etc/nsswitch.conf.bak ]; then + mv /mnt/etc/nsswitch.conf.bak /mnt/etc/nsswitch.conf + fi # setup custom rungetty mkdir -p /mnt/root/bin -- cgit v1.2.3-55-g7522