summaryrefslogtreecommitdiffstats
path: root/os-plugins/plugins/kiosk/XX_kiosk.sh
diff options
context:
space:
mode:
authorSebastian Schmelzer2009-06-03 14:20:27 +0200
committerSebastian Schmelzer2009-06-03 14:20:27 +0200
commitd65152b69434b2bcd8b367d0fc21ad869f3c2e79 (patch)
tree82049723974f708ec78e9c6260753fd45c8c35c4 /os-plugins/plugins/kiosk/XX_kiosk.sh
parentstate for wlanboot-plugin (diff)
downloadcore-d65152b69434b2bcd8b367d0fc21ad869f3c2e79.tar.gz
core-d65152b69434b2bcd8b367d0fc21ad869f3c2e79.tar.xz
core-d65152b69434b2bcd8b367d0fc21ad869f3c2e79.zip
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
Diffstat (limited to 'os-plugins/plugins/kiosk/XX_kiosk.sh')
-rw-r--r--os-plugins/plugins/kiosk/XX_kiosk.sh12
1 files changed, 12 insertions, 0 deletions
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