Samba: Add k-pdbedit script.
Change-Id: I297abaf51777e1204f70d74cd20e2b7af5b5426f
diff --git a/samba/k-pdbedit b/samba/k-pdbedit
new file mode 100755
index 0000000..48660c2
--- /dev/null
+++ b/samba/k-pdbedit
@@ -0,0 +1,8 @@
+#! /bin/sh
+set -e -o pipefail
+
+pod=$(kubectl get pods -lname=samba -ojsonpath='{.items[].metadata.name}')
+
+kubectl exec -c master -ti "$pod" -- pdbedit --configfile=/var/lib/samba/smb.conf "$@"
+kubectl cp "$pod":/var/lib/samba/private/smbpasswd smbpasswd
+kubectl create secret generic samba-smbpasswd --save-config --dry-run=client --from-file=smbpasswd=smbpasswd -oyaml | kubectl apply -f -