|
|
|
@ -4,8 +4,8 @@ export LANG=C.UTF-8
|
|
|
|
|
f_version() {
|
|
|
|
|
echo -e '
|
|
|
|
|
Сценарий ввода РЕД ОС в домен Windows/SAMBA, FreeIPA
|
|
|
|
|
Версия: 0.6.6
|
|
|
|
|
Последнее обновление: 04.03.2024
|
|
|
|
|
Версия: 0.6.7
|
|
|
|
|
Последнее обновление: 14.03.2024
|
|
|
|
|
|
|
|
|
|
(c) РЕД СОФТ
|
|
|
|
|
'
|
|
|
|
@ -986,10 +986,19 @@ new_version="1.5.0"
|
|
|
|
|
installed_version_no_dot=${installed_version//./}
|
|
|
|
|
new_version_no_dot=${new_version//./}
|
|
|
|
|
|
|
|
|
|
# Сравниваем числа без точек
|
|
|
|
|
# Сравниваем числа без точек (если версии authselect равны)
|
|
|
|
|
if [ "$installed_version_no_dot" -ge "$new_version_no_dot" ]; then
|
|
|
|
|
echo "" &>> /var/log/join-to-domain.log
|
|
|
|
|
echo " Новая версия authselect ${installed_version}" &>> /var/log/join-to-domain.log
|
|
|
|
|
directory_authselect="/etc/authselect/custom/sssd_domain/"
|
|
|
|
|
if [ -d "$directory_authselect" ]; then
|
|
|
|
|
rm -rf "$directory_authselect"
|
|
|
|
|
fi
|
|
|
|
|
# Создаем новый профиль sssd_domain
|
|
|
|
|
authselect create-profile sssd_domain -b sssd &>> /var/log/join-to-domain.log
|
|
|
|
|
# Изменяем nsswitch.conf
|
|
|
|
|
sed -i 's/\bhosts:.*/hosts: files myhostname resolve dns mdns4_minimal [!UNAVAIL=return]/g' /etc/authselect/custom/sssd_domain/nsswitch.conf &>> /var/log/join-to-domain.log
|
|
|
|
|
authselect select custom/sssd_domain with-faillock with-fingerprint with-smartcard with-mkhomedir --force &>> /var/log/join-to-domain.log
|
|
|
|
|
else
|
|
|
|
|
# Старая версия authselect
|
|
|
|
|
cp /etc/authselect/user-nsswitch.conf /etc/authselect/user-nsswitch.conf.$v_date_time &>> /var/log/join-to-domain.log
|
|
|
|
@ -1077,7 +1086,15 @@ fi
|
|
|
|
|
echo -e ' 5) Выполняется authselect' | tee -a /var/log/join-to-domain.log
|
|
|
|
|
|
|
|
|
|
if [ "$installed_version_no_dot" -ge "$new_version_no_dot" ]; then
|
|
|
|
|
authselect select winbind with-mdns4 with-mkhomedir with-krb5 --force &>> /var/log/join-to-domain.log
|
|
|
|
|
dir_winbind_authselect="/etc/authselect/custom/winbind_domain/"
|
|
|
|
|
if [ -d "$dir_winbind_authselect" ]; then
|
|
|
|
|
rm -rf "$dir_winbind_authselect"
|
|
|
|
|
fi
|
|
|
|
|
# Создаем новый профиль sssd_domain
|
|
|
|
|
authselect create-profile winbind_domain -b winbind &>> /var/log/join-to-domain.log
|
|
|
|
|
# Изменяем nsswitch.conf
|
|
|
|
|
sed -i 's/\bhosts:.*/hosts: files myhostname resolve dns mdns4_minimal [!UNAVAIL=return]/g' /etc/authselect/custom/winbind_domain/nsswitch.conf &>> /var/log/join-to-domain.log
|
|
|
|
|
authselect select custom/winbind_domain with-krb5 with-faillock with-fingerprint with-mkhomedir --force &>> /var/log/join-to-domain.log
|
|
|
|
|
else
|
|
|
|
|
# Старая версия authselect
|
|
|
|
|
authselect select winbind with-mkhomedir with-krb5 --force &>> /var/log/join-to-domain.log
|
|
|
|
@ -1299,9 +1316,9 @@ if [[ -n "$dns_auth_none" ]]; then
|
|
|
|
|
else dns_auth_none="GSS-TSIG"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Перезапись профиля
|
|
|
|
|
# Перезапись профиля sssd_domain
|
|
|
|
|
if [ "$installed_version_no_dot" -ge "$new_version_no_dot" ]; then
|
|
|
|
|
/usr/bin/authselect select sssd with-mkhomedir with-mdns4 --force &>> /var/log/join-to-domain.log
|
|
|
|
|
authselect select custom/sssd_domain with-faillock with-fingerprint with-smartcard with-mkhomedir --force &>> /var/log/join-to-domain.log
|
|
|
|
|
fi
|
|
|
|
|
# Настройка sssd.conf
|
|
|
|
|
echo -e ' 5) Настройка sssd' | tee -a /var/log/join-to-domain.log
|
|
|
|
|