summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Olson <olson@cumulusnetworks.com>2018-04-06 15:06:27 -0700
committerDave Olson <olson@cumulusnetworks.com>2018-04-06 15:47:08 -0700
commit4b24261d4a28ed1cd994939d6fa658b44c30a0ac (patch)
treec67c0c6116a0413b31905e43d238df982eab35ef
parent19e1c2b3cfd99d7ea62e4e8a827febcd7ec15e19 (diff)
downloadlibnss-mapuser-4b24261d4a28ed1cd994939d6fa658b44c30a0ac.tar.gz
libnss-mapuser-4b24261d4a28ed1cd994939d6fa658b44c30a0ac.zip
cleanup group mapname in nsswitch on remove; add priv user to sudo group
Needed to add sed code to remove mapname from nsswitch.conf group search line, similar to passwd line. Somehow forgot that when I added the code to add it in postinst I also somehow forgot to checkin the adduser line to add the radius_priv_user to the sudo group, so fixed that too.
-rw-r--r--debian/changelog2
-rw-r--r--debian/libnss-mapuser.postinst1
-rw-r--r--debian/libnss-mapuser.prerm1
3 files changed, 3 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index d11304d..190d66d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,7 +8,7 @@ libnss-mapuser (1.1.0-cl3u1) RELEASED; urgency=low
have radius_user and/or radius_priv_user, to give that that user account
more privileges, similar to tacplus client privilege 15.
- -- dev-support <dev-support@cumulusnetworks.com> Tue, 03 Apr 2018 00:13:47 -0700
+ -- dev-support <dev-support@cumulusnetworks.com> Fri, 06 Apr 2018 15:46:56 -0700
libnss-mapuser (1.0.0-cl3u2) RELEASED; urgency=low
diff --git a/debian/libnss-mapuser.postinst b/debian/libnss-mapuser.postinst
index ee6a70d..13bf0d0 100644
--- a/debian/libnss-mapuser.postinst
+++ b/debian/libnss-mapuser.postinst
@@ -32,6 +32,7 @@ case "$1" in
adduser --quiet radius_user netshow
# privileged radius logins can run net config commands, as well as show
adduser --quiet radius_priv_user netedit
+ adduser --quiet radius_priv_user sudo
exit 0
)
;;
diff --git a/debian/libnss-mapuser.prerm b/debian/libnss-mapuser.prerm
index af98f1b..c4f259f 100644
--- a/debian/libnss-mapuser.prerm
+++ b/debian/libnss-mapuser.prerm
@@ -8,6 +8,7 @@ if [ "$1" = remove ]; then
if [ -e "/etc/nsswitch.conf" ]; then
sed -i -e '/^passwd:.*mapuid[ \t]/s/mapuid[ \t]//' \
-e '/^passwd:.*[ \t]mapname/s/[ \t]mapname//' \
+ -e '/^group:.*[ \t]mapname/s/[ \t]mapname//' \
/etc/nsswitch.conf || true # don't prevent remove on error
fi
fi