Sindbad~EG File Manager
3
�f��@sRddlmZmZmZmZGdd�de�ZGdd�dee�ZGdd�deee�ZdS) �)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPlugincs4eZdZdZdZdZdZ�fdd�Zd d
�Z�Z S)�LdapzLDAP configurationZldap�identity�sysmgmt�systemz/etc/openldap/ldap.confcst�j�|jd�dS)Nz/etc/ldap.conf)�super�setup�
add_copy_spec)�self)� __class__��/usr/lib/python3.6/ldap.pyrs
z
Ldap.setupcCs|jddd�dS)Nz/etc/ldap.confz(\s*bindpw\s*)\S+z\1******)�do_file_sub)r
rrr�postprocsz
Ldap.postproc)rrr )
�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofiles� ldap_confrr�
__classcell__rr)rrrsrcs0eZdZd Zd
Z�fdd�Z�fdd�Z�ZS)�
RedHatLdap�openldap�
nss-pam-ldapd�/etc/ldap.conf�/etc/pam_ldap.confcsBt�j�|jdddddg�|j|jdddd g�|jd
�dS)Nz/etc/openldap/certs/passwordz/etc/openldap/certs/pwfile.txtz/etc/openldap/certs/pin.txtz/etc/openldap/certs/*passw*z/etc/openldap/certs/key3.dbz/etc/openldap/certs/cert8.dbz/etc/openldap/certs/secmod.dbz/etc/nslcd.confz/etc/pam_ldap.confzcertutil -L -d /etc/openldap)r
rZadd_forbidden_pathrr�add_cmd_output)r
)rrrr!s
zRedHatLdap.setupcs*t�j�xdD]}|j|dd�qWdS)N�/etc/nslcd.conf�/etc/pam_ldap.confz(\s*bindpw\s*)\S+z
\1********)rr)r
rr)r
�file)rrrr4s
zRedHatLdap.postproc)rr)rr)rrr�packages�filesrrrrr)rrrsrcs0eZdZdZdZ�fdd�Z�fdd�Z�ZS) �
DebianLdapz/etc/ldap/ldap.conf�slapd�
ldap-utilscsft�j�d}|j|jdddg�|jd�|j|ddd�|j|d d
d�|j|ddd�dS)
Nz,ldapsearch -Q -LLL -Y EXTERNAL -H ldapi:/// z/etc/slapd.confz/etc/ldap/slapd.dz/etc/nslcd.confz+ldapsearch -x -b '' -s base 'objectclass=*'z/-b cn=config '(!(objectClass=olcSchemaConfig))'Zconfiguration_minus_schemas)Zsuggest_filenamez-b cn=schema,cn=config dnZloaded_schemasz0-b cn=config '(olcAccess=*)' olcAccess olcSuffixZaccess_control_lists)r
rrrr)r
Zldap_search)rrrrCs"
zDebianLdap.setupcs*t�j�|jddd�|jddd�dS)Nz/etc/nslcd.confz(\s*bindpw\s*)\S+z
\1********Z
ldapsearchz(olcRootPW\: \s*)\S+)r
rrZdo_cmd_output_sub)r
)rrrrZs
zDebianLdap.postproc)r$r%)rrrrr!rrrrr)rrr#>sr#N)Zsos.report.pluginsrrrrrrr#rrrr�<module> s"
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists