Resolving Bug 222012 to allow the scripts called from yast to recognize the SLES server so the won't modigy the PAM stack.

This commit is contained in:
Cameron (Kamran) Mashayekhi 2006-12-05 11:16:10 +00:00
parent d2961b73ca
commit 40f5250684
2 changed files with 73 additions and 61 deletions

View File

@ -1,10 +1,15 @@
#!/bin/bash
# Adding CASA pam entries to pam files.
rm -f *.rpmsave
# Adding CASA pam entries to pam files only on the desktop.
DESKTOP=`grep -i desktop SuSE-release`
prefix="/etc/pam.d"
for auth_file in "$prefix/login" "$prefix/sshd" "$prefix/xdm" "$prefix/gdm" "$prefix/kdm"
do
if [ "$DESKTOP" != "" ]
then
rm -f *.rpmsave
prefix="/etc/pam.d"
for auth_file in "$prefix/login" "$prefix/sshd" "$prefix/xdm" "$prefix/gdm" "$prefix/kdm"
do
if [ -f $auth_file ]
then
sed -i '/pam_micasa/d' $auth_file
@ -27,11 +32,11 @@ do
sed -i "0,/^auth/s/^\(auth.*\)/\1\n$auth_entry/" $auth_file
fi
done
done
for password_file in "$prefix/passwd" "$prefix/gnome-passwd"
do
for password_file in "$prefix/passwd" "$prefix/gnome-passwd"
do
if [ -f $password_file ]
then
sed -i '/pam_micasa/d' $password_file
@ -54,4 +59,7 @@ do
sed -i "0,/^password/s/^\(password.*\)/\1\n$passwd_entry/" $password_file
fi
done
done
fi

View File

@ -1,12 +1,16 @@
#!/bin/bash
# Remove the CASA pam entries from pam files.
DESKTOP=`grep -i desktop SuSE-release`
prefix="/etc/pam.d"
for pam_file in "$prefix/login" "$prefix/sshd" "$prefix/xdm" "$prefix/gdm" "$prefix/kdm" "$prefix/passwd" "$prefix/gnome-passwd"
do
if [ "$DESKTOP" != "" ]
then
prefix="/etc/pam.d"
for pam_file in "$prefix/login" "$prefix/sshd" "$prefix/xdm" "$prefix/gdm" "$prefix/kdm" "$prefix/passwd" "$prefix/gnome-passwd"
do
if [ -f $pam_file ]
then
sed -i '/pam_micasa/d' $pam_file
fi
done
done
fi