Adding chmod, changing timeout, removing warning

Signed-off-by: Georg <georg@lysergic.dev>
This commit is contained in:
Georg Pfuetzenreuter 2021-09-24 23:25:21 +02:00
parent 8b3d82bd94
commit c885a5ef8a

View File

@ -1,7 +1,6 @@
#!/bin/sh #!/bin/sh
echo "THIS SCRIPT IS NOT READY FOR USE IN PRODUCTION" echo "You have 10 seconds to abort with Ctrl+C."
echo "YOU HAVE 15 seconds to abort with Ctrl+C." sleep 10s
sleep 15s
if [ "$(id -u)" = "0" ]; then if [ "$(id -u)" = "0" ]; then
DISTRIB=$(awk -F= '/^NAME/{print $2}' /etc/os-release) DISTRIB=$(awk -F= '/^NAME/{print $2}' /etc/os-release)
if [ "${DISTRIB}" = '"openSUSE Leap"' ] || [ "${DISTRIB}" = '"openSUSE Tumbleweed"' ]; then if [ "${DISTRIB}" = '"openSUSE Leap"' ] || [ "${DISTRIB}" = '"openSUSE Tumbleweed"' ]; then
@ -61,6 +60,7 @@ ldap_user_ssh_public_key = sshPublicKey
sudo_provider = ldap sudo_provider = ldap
ldap_sudo_search_base = ou=SUDOers,ou=syscid-system,dc=syscid,dc=com ldap_sudo_search_base = ou=SUDOers,ou=syscid-system,dc=syscid,dc=com
EOF EOF
chmod 600 /etc/sssd/sssd.conf
mv /etc/nsswitch.conf /etc/nsswitch.conf.orig mv /etc/nsswitch.conf /etc/nsswitch.conf.orig
cat <<'EOF' >/etc/nsswitch.conf cat <<'EOF' >/etc/nsswitch.conf
# SYSCID Directory and Authentication Service # SYSCID Directory and Authentication Service