/usr/share/sadms-2.0.15/uninstall-pam.sh is in sadms 2.0.15.repack-0ubuntu2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | #!/bin/bash
# bbou@ac-toulouse.fr
# 2007-05-22 16:40:57
# uninstall-pam.sh
# shell main install entry point
# P A R S E C O M M A N D L I N E
hasfile=
oprev=
for o ;do
# if the previous option needs an argument, assign it.
if [ -n "${oprev}" ]; then
eval "${oprev}=\${o}"
oprev=
continue
fi
case "${o}" in
-f)
oprev=file
hasfile=true
;;
esac
done
if [ ! -z "${hasfile}" ]; then
[ -n "${file}" ] || file="sadms.settings"
i=0
while read line; do
name=`echo ${line} | awk 'BEGIN{FS="="}{print $1}'`
value=`echo ${line} | awk 'BEGIN{FS="="}{print $2}'`
#echo "+${line} = ${name} + ${value}"
case ${name} in
cifsmountpoint) MYMOUNTPOINT="${value}" ; i=$(( i + 1 )) ;;
esac
MYNARGS=${i}
done < ${file}
echo "+read ${MYNARGS} settings from ${file}"
echo
else
# echo no file
MYNARGS=$#
MYMOUNTPOINT="$3"
fi
echo "-------------------------------------------------------------------------------"
echo "S A D M S `cat version | head -n 1`"
echo "Samba as Active Directory Member Server"
echo "bbou@ac-toulouse.fr"
echo "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -"
echo "install PAM"
echo "-------------------------------------------------------------------------------"
# check testing/enforcing mode
MYENFORCE=
if [ -z "${MYENFORCE}" ]; then
read -p 'Enforce (y/n): ' MYENFORCE
if [ "${MYENFORCE}" != "y" ]; then
MYENFORCE='-t'
else
MYENFORCE=
fi
fi
# parameter
if [ -z "${MYMOUNTPOINT}" ]; then
read -p 'CIFS Mount point (default:~/.cifsmount): ' MYMOUNTPOINT
[ -z "${MYMOUNTPOINT}" ] && MYMOUNTPOINT='~/.cifsmount'
fi
# display
echo
echo 'CIFS mount point: '"${MYMOUNTPOINT}"
if [ "${MYENFORCE}" == "-t" ]; then
echo 'Testing'
else
echo 'Enforcing'
fi
echo
read -p 'Do you want to proceed (y/n) ?: ' yes
case ${yes} in
y*|Y*)
./_uninstall-pam-core.sh ${MYENFORCE} -w -h -m "${MYMOUNTPOINT}"
exit $?
;;
*)
exit
;;
esac
|