[debian-lan-devel] [SCM] Debian-LAN development and packaging branch, master, updated. 0.7-11-g693c2f3
Andreas B. Mundt
andi at debian.org
Sat Jan 26 07:41:34 UTC 2013
The following commit has been merged in the master branch:
commit df12048b04a1a20a9e25b6684957816d45bb0f27
Author: Andreas B. Mundt <andi at debian.org>
Date: Fri Jan 25 23:57:11 2013 +0100
Fetch sudoers' base from LDAP.
diff --git a/fai/config/package_config/DEVTOOLS b/fai/config/package_config/DEVTOOLS
index 87a5257..d7fe3db 100644
--- a/fai/config/package_config/DEVTOOLS
+++ b/fai/config/package_config/DEVTOOLS
@@ -14,6 +14,3 @@ nmap
## Documentation
#texlive
#auctex
-
-## LDAP:
-ldap-utils
diff --git a/fai/config/package_config/LDAP_CLIENT b/fai/config/package_config/LDAP_CLIENT
index 3881287..671ff47 100644
--- a/fai/config/package_config/LDAP_CLIENT
+++ b/fai/config/package_config/LDAP_CLIENT
@@ -2,3 +2,4 @@
## Put all setup-dependent packages in the SETUP_* class.
PACKAGES aptitude
libnss-ldapd
+ldap-utils
diff --git a/fai/config/scripts/LDAP_CLIENT/50-sudoers b/fai/config/scripts/LDAP_CLIENT/50-sudoers
new file mode 100755
index 0000000..ab4a272
--- /dev/null
+++ b/fai/config/scripts/LDAP_CLIENT/50-sudoers
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+set -e
+
+## Fetch sudoers' base from LDAP:
+BASE=$($ROOTCMD ldapsearch -xLLL "(ou=sudoers)" dn | cut -d ' ' -f 2)
+
+if [ -n "$BASE" ] ; then
+ ainsl /etc/ldap/ldap.conf "sudoers_base $BASE"
+fi
--
Debian-LAN development and packaging
More information about the debian-lan-devel
mailing list