--- system-auth-old 2023-05-05 08:52:31.376390938 +0500 +++ system-auth 2023-05-05 10:44:35.093112123 +0500 @@ -716,8 +716,13 @@ # Set correct FQDN set_hostname "$host_name.$ldomain" + # Set correct OS name and version + OS=$(hostnamectl | grep "Operating System" | sed 's/.*Operating System: //' | sed 's/ (.*//'| sed 's/[ \t]*$//') + OS_NAME=${OS% *} + OS_VERSION=${OS##* } + # Join to domain - $net_cmd ads join --use-kerberos=required --no-dns-updates --use-krb5-ccache="$krb_ccache_name" $OU + $net_cmd ads join --use-kerberos=required --no-dns-updates --use-krb5-ccache="$krb_ccache_name" $OU osName="$OS_NAME" osVer="$OS_VERSION" [ "$?" -ne 0 ] && return 1