]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb:events: Add 46.update-keytabs.script for 'recovered' event
authorPavel Filipenský <pfilipensky@samba.org>
Mon, 8 Apr 2024 12:47:21 +0000 (14:47 +0200)
committerPavel Filipensky <pfilipensky@samba.org>
Fri, 26 Jul 2024 17:12:36 +0000 (17:12 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=6750

Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
ctdb/config/events/legacy/46.update-keytabs.script [new file with mode: 0755]

diff --git a/ctdb/config/events/legacy/46.update-keytabs.script b/ctdb/config/events/legacy/46.update-keytabs.script
new file mode 100755 (executable)
index 0000000..f207a7b
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+# script to update keytab
+
+[ -n "$CTDB_BASE" ] ||
+       CTDB_BASE=$(d=$(dirname "$0") && cd -P "$d" && dirname "$PWD")
+
+case "$1" in
+recovered)
+       net ads keytab create --option='sync machine password script=' --configfile="$CTDB_BASE/lib/server.conf"
+       ;;
+esac