0e2f327e7c
Fix for circular dependency between CASA and Gnome Keyring. Fix for yast grey out button.
24 lines
610 B
Bash
Executable File
24 lines
610 B
Bash
Executable File
#!/bin/bash
|
|
# Adding CASA pam entries to pam files.
|
|
rm -f *.rpmsave
|
|
for file in "/etc/pam.d/login" "/etc/pam.d/sshd" "/etc/pam.d/xdm" "/etc/pam.d/gdm" "/etc/pam.d/kdm"
|
|
do
|
|
if [ -f $file ]
|
|
then
|
|
sed -i '/pam_micasa/d' $file
|
|
var=`grep pam_unix2.so $file`
|
|
entry=`echo -e "auth\t required\tpam_micasa.so"`
|
|
if [ "$var" != "" ]
|
|
then
|
|
sed -i "/^auth.*required.*pam_unix2.so/a$entry" $file
|
|
continue
|
|
fi
|
|
var2=`grep common-auth $file`
|
|
if [ "$var2" != "" ]
|
|
then
|
|
sed -i "/^auth.*include.*common-auth/a$entry" $file
|
|
continue
|
|
fi
|
|
sed -i "0,/^auth/s/^\(auth.*\)/\1\n$entry/" $file
|
|
fi
|
|
done |