diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 17:20:02 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 17:20:02 +0000 |
commit | 0a354ad0b2c9eaaa204c31db478da109dc6d2a8b (patch) | |
tree | 2467caa8ad20a7fca31bef64224e41a4238db0c9 /debian/libnss-winbind.postinst | |
parent | Adding upstream version 2:4.20.0+dfsg. (diff) | |
download | samba-0a354ad0b2c9eaaa204c31db478da109dc6d2a8b.tar.xz samba-0a354ad0b2c9eaaa204c31db478da109dc6d2a8b.zip |
Adding debian version 2:4.20.0+dfsg-1~exp1.debian/2%4.20.0+dfsg-1_exp1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/libnss-winbind.postinst')
-rw-r--r-- | debian/libnss-winbind.postinst | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/libnss-winbind.postinst b/debian/libnss-winbind.postinst new file mode 100644 index 0000000..2f751f2 --- /dev/null +++ b/debian/libnss-winbind.postinst @@ -0,0 +1,22 @@ +#!/bin/sh + +set -e + +# Try to add the nss entry to the "passwd" and "group" lines in +# /etc/nsswitch.conf to automatically enable libnss-winbind support; +# do not change the configuration if the lines already contain "winbind" +# Only add winbind, not wins, since the latter is of little use in 2022+ + +if [ "$1" = configure ] && [ -z "$2" ]; then + echo "First installation detected, adding winbind to /etc/nsswitch.conf..." + if ! [ -e /etc/nsswitch.conf ]; then + echo "Could not find /etc/nsswitch.conf." + else + sed -r -i \ + -e '/^(passwd|group):.*[[:space:]]winbind\b/b' \ + -e 's/^(passwd|group):.*/& winbind/' \ + /etc/nsswitch.conf + fi +fi + +#DEBHELPER# |