[debian-edu-commits] debian-edu/ 01/04: Adjust share/debian-edu-config/tools/gosa-create-host
Wolfgang Schweer
schweer-guest at moszumanska.debian.org
Wed May 23 21:27:07 BST 2018
This is an automated email from the git hooks/post-receive script.
schweer-guest pushed a commit to branch master
in repository debian-edu-config.
commit aac12f35692447eae053e57d88590f99662769d3
Author: Wolfgang Schweer <wschweer at arcor.de>
Date: Wed May 23 22:07:27 2018 +0200
Adjust share/debian-edu-config/tools/gosa-create-host
Add code to generate host/$fqdn and nfs/$fqdn Kerberos Principals.
Add code to generate /etc/$fqdn.keytab file.
---
share/debian-edu-config/tools/gosa-create-host | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/share/debian-edu-config/tools/gosa-create-host b/share/debian-edu-config/tools/gosa-create-host
index d361226..f7973be 100755
--- a/share/debian-edu-config/tools/gosa-create-host
+++ b/share/debian-edu-config/tools/gosa-create-host
@@ -1,6 +1,6 @@
#!/bin/bash
-set -ex
+set -e
## This script is run by www-data using sudo. Keep that in mind!
## Make sure that malicious execution cannot hurt.
@@ -44,10 +44,20 @@ while read KEY VALUE ; do
macAddress:) MAC="$VALUE" ;;
"")
FQDN=`find_fqdn $HOSTNAME $IP`
- test -n $FQDN && kadmin.local -q "add_principal -policy hosts -randkey -x \"$HOSTDN\" host/$FQDN" && logger -t gosa-create-host -p notice Krb5 principal \'host/$FQDN\' created.
+ if ! [ "$FQDN" == "" ] ; then
+ kadmin.local -q "add_principal -policy hosts -randkey -x \"$HOSTDN\" host/$FQDN"
+ logger -t gosa-create-host -p notice Krb5 principal \'host/$FQDN\' created.
+ kadmin.local -q "add_principal -policy hosts -randkey nfs/$FQDN"
+ logger -t gosa-create-host -p notice Krb5 principal \'nfs/$FQDN\' created.
+ kadmin.local -q "ktadd -k /etc/$FQDN.keytab host/$FQDN"
+ kadmin.local -q "ktadd -k /etc/$FQDN.keytab nfs/$FQDN"
+ logger -t gosa-create-host -p notice Krb5 keytab file for \'$FQDN\' created.
+ fi
;;
esac
done
+/usr/share/debian-edu-config/tools/gosa-sync-dns-nfs
+
exit 0
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git
More information about the debian-edu-commits
mailing list