[debian-edu-commits] [Git][debian-edu/debian-edu-config][personal/gber/fix-update-dlw-krb5-keytabs] 2 commits: share/debian-edu-config/tools/gosa-remove: Fix kadmin.local, Use '-force' to...

Guido Berhörster (@gber) gitlab at salsa.debian.org
Tue Jul 25 17:49:37 BST 2023



Guido Berhörster pushed to branch personal/gber/fix-update-dlw-krb5-keytabs at Debian Edu / debian-edu-config


Commits:
df38e13d by Daniel Teichmann at 2023-07-25T18:06:37+02:00
share/debian-edu-config/tools/gosa-remove: Fix kadmin.local, Use '-force' to disable interaction via stdin.

- - - - -
a906a0bc by Guido Berhoerster at 2023-07-25T16:49:32+00:00
update-dlw-krb5-keytabs: Handle missing/empty diskless-workstation-hosts

The "set -e" makes the shell exit with status 1 immediately without any message
if the grep in the subshell does not match anything. This in turn makes scripts
like gosa-remove-host fail without any error message.  Exit gracefully with a
message and exit status 0 if diskless-workstation-hosts netgroup is
missing/empty.

- - - - -


2 changed files:

- share/debian-edu-config/tools/gosa-remove
- share/debian-edu-config/tools/update-dlw-krb5-keytabs


Changes:

=====================================
share/debian-edu-config/tools/gosa-remove
=====================================
@@ -52,7 +52,7 @@ mv $HOMEDIR $RM_HOMEDIR
 chown root:root $RM_HOMEDIR
 chmod go-rwx $RM_HOMEDIR
 
-kadmin.local -q "delete_principal $USERID"
+kadmin.local -q "delete_principal -force $USERID"
 pdbedit -x -u $USERID > /dev/null
 logger -t gosa-remove -p notice Home directory \'$HOMEDIR\' marked for deletion, samba account and principal \'$USERID\' removed.
 


=====================================
share/debian-edu-config/tools/update-dlw-krb5-keytabs
=====================================
@@ -49,7 +49,7 @@ DLW_KRB5_KEYTABS_DIR="/var/lib/debian-edu/dlw-keytabs"
 
 # Clear caching daemon's NIS netgroup cache (this assures an LDAP re-lookup).
 nscd -i netgroup
-DLW_HOSTS_NETGROUP=$(netgroup diskless-workstation-hosts | grep -E "\.${DOMAIN}$")
+DLW_HOSTS_NETGROUP="$(netgroup diskless-workstation-hosts | grep -E "\.${DOMAIN}$")" || true
 
 # Do some sanity checks...
 if [ "$(id -u)" != "0" ]; then



View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/b156c586f595096b4aaa224457f33261cdcaba01...a906a0bc99cd97f167bfc5386543cfab9d533539

-- 
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/b156c586f595096b4aaa224457f33261cdcaba01...a906a0bc99cd97f167bfc5386543cfab9d533539
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20230725/c847d155/attachment-0001.htm>


More information about the debian-edu-commits mailing list