From 55b4261eb5a05d761ede8274ff62340290122e30 Mon Sep 17 00:00:00 2001 From: Bryan Quigley Date: Mon, 12 Mar 2018 14:13:11 -0400 Subject: [ldap] Collect nslcd.conf like RH does This collects nslcd.conf and also removes the bindpw from it. Resolves: #1247 Signed-off-by: Bryan Quigley Signed-off-by: Bryn M. Reeves --- sos/plugins/ldap.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sos/plugins/ldap.py b/sos/plugins/ldap.py index b9ae6f7c..ef551f01 100644 --- a/sos/plugins/ldap.py +++ b/sos/plugins/ldap.py @@ -83,6 +83,7 @@ class DebianLdap(Ldap, DebianPlugin, UbuntuPlugin): self.ldap_conf, "/etc/slapd.conf", "/etc/ldap/slapd.d" + "/etc/nslcd.conf", ]) self.add_cmd_output("ldapsearch -x -b '' -s base 'objectclass=*'") @@ -98,10 +99,16 @@ class DebianLdap(Ldap, DebianPlugin, UbuntuPlugin): def postproc(self): super(DebianLdap, self).postproc() + self.do_file_sub( + "/etc/nslcd.conf", + r"(\s*bindpw\s*)\S+", + r"\1********" + ) self.do_cmd_output_sub( "ldapsearch", r"(olcRootPW\: \s*)\S+", r"\1********" ) + # vim: set et ts=4 sw=4 : -- cgit