Skip to content

Commit

Permalink
utils/join-linux-to-AD.sh: add verbose option to gssd service
Browse files Browse the repository at this point in the history
for getting more debug info while doing nfs krb5 mount fail

Signed-off-by: Jianhong Yin <[email protected]>
  • Loading branch information
tcler committed Jan 1, 2025
1 parent 78b2793 commit 6067404
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions utils/join-linux-to-AD.sh
Original file line number Diff line number Diff line change
Expand Up @@ -366,26 +366,21 @@ hostnamectl hostname ${MY_FQDN}
#

if [ "$config_krb" == "yes" ]; then
infoecho "krb 1. Use 'net ads' to add related service principals..."
sed -ri '/^# ?verbosity=.*$/{s//verbosity=3/}' /etc/nfs.conf

infoecho "krb 1. Use 'net ads' to add related service principals..."
# Only need "-U Administrator%${AD_DS_SUPERPW}" when ticket
# "Administrator@${AD_DS_NAME}" expires, otherwise just skip
run "net ads setspn list $netKrb5Opt"

#net ads setspn list $netKrb5Opt | grep -q HOST || {
run "net ads setspn add host/$MY_FQDN $netKrb5Opt"
run "net ads setspn add host/$MY_NETBIOS $netKrb5Opt"
#}
run "net ads setspn add host/$MY_FQDN $netKrb5Opt"
run "net ads setspn add host/$MY_NETBIOS $netKrb5Opt"

#net ads setspn list $netKrb5Opt | grep -q ROOT || {
run "net ads setspn add root/$MY_FQDN $netKrb5Opt"
run "net ads setspn add root/$MY_NETBIOS $netKrb5Opt"
#}
run "net ads setspn add root/$MY_FQDN $netKrb5Opt"
run "net ads setspn add root/$MY_NETBIOS $netKrb5Opt"

#net ads setspn list $netKrb5Opt | grep -q NFS || {
run "net ads setspn add nfs/$MY_FQDN $netKrb5Opt"
run "net ads setspn add nfs/$MY_NETBIOS $netKrb5Opt"
#}
run "net ads setspn add nfs/$MY_FQDN $netKrb5Opt"
run "net ads setspn add nfs/$MY_NETBIOS $netKrb5Opt"

run "net ads keytab create $netKrb5Opt"
run "net ads setspn list $netKrb5Opt"
Expand Down

0 comments on commit 6067404

Please sign in to comment.