Commit ab1e1d92 authored by Vitaly Lipatov's avatar Vitaly Lipatov

tune_sssd.sh: improvements

parent a965adbf
......@@ -22,7 +22,7 @@ fi
epm assure bind-utils || fatal
# Get REALM (needed for sssd tuning only) from DNS
REALM=$(host -t txt _kerberos | sed -e 's|.*"\(.*\)".*|\1|') #"
if [ -z "$REALM" ] ; then
if [ -z "$REALM" ] || echo "$REALM" | grep "not found" ; then
if [ -n "$1" ] ; then
REALM="$1"
shift
......@@ -161,20 +161,23 @@ kinit $ADMIN || exit
echo "Join to domain... "
net ads join -k || exit
kdestroy
control system-auth sss
serv nscd off
serv sssd on
case $(distr_info -d) in
ALTLinux)
control system-auth sss
# TODO: use common domain groups
# TODO: check libnss-role version
epm assure rolelst libnss-role
roleadd etersysadmin wheel
;;
*)
echo "Unknown system $(distr_info -d). Check /etc/pam.d/system-auth for pam_sss.so using"
;;
esac
serv nscd off
serv sssd on
subst "s|^# GSSAPIAuthentication no| GSSAPIAuthentication yes|" /etc/openssh/ssh_config
subst "s|^# GSSAPIDelegateCredentials no| GSSAPIDelegateCredentials yes|" /etc/openssh/ssh_config
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment