aureport –tty
yum install vlock
visudo
→ comentar %wheel ALL=(ALL) ALLsudoreplay
yum -y install openldap-servers openldap-clients cp /usr/share/openldap-servers/DB_CONFIG.example /var/lib/ldap/DB_CONFIG chown ldap. /var/lib/ldap/DB_CONFIG /etc/init.d/slapd start
slappasswd # {SSHA}vi6WZm+vOWA4E5PfgHtZlF+s8IelEfMY
# specify the password generated above for "olcRootPW" section dn: olcDatabase={0}config,cn=config changetype: modify add: olcRootPW olcRootPW: {SSHA}vi6WZm+vOWA4E5PfgHtZlF+s8IelEfMY
ldapadd -Y EXTERNAL -H ldapi:/// -f chrootpw.ldif
slappasswd
changetype: modify replace: olcAccess olcAccess: {0}to * by dn.base="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read by dn.base="cn=Manager,dc=curso,dc=local" read by * none dn: olcDatabase={2}bdb,cn=config changetype: modify replace: olcSuffix olcSuffix: dc=curso,dc=local dn: olcDatabase={2}bdb,cn=config changetype: modify replace: olcRootDN olcRootDN: cn=Manager,dc=curso,dc=local dn: olcDatabase={2}bdb,cn=config changetype: modify add: olcRootPW olcRootPW: {SSHA}vi6WZm+vOWA4E5PfgHtZlF+s8IelEfMY dn: olcDatabase={2}bdb,cn=config changetype: modify add: olcAccess olcAccess: {0}to attrs=userPassword,shadowLastChange by dn="cn=Manager,dc=curso,dc=local" write by anonymous auth by self write by * none olcAccess: {1}to dn.base="" by * read olcAccess: {2}to * by dn="cn=Manager,dc=curso,dc=local" write by * read
ldapmodify -Y EXTERNAL -H ldapi:/// -f chdomain.ldif
dn: dc=curso,dc=local objectClass: top objectClass: dcObject objectclass: organization o: Curso Local dc: curso dn: cn=Manager,dc=curso,dc=local objectClass: organizationalRole cn: Manager description: Directory Manager dn: ou=People,dc=curso,dc=local objectClass: organizationalUnit ou: People dn: ou=Group,dc=curso,dc=local objectClass: organizationalUnit ou: Group
ldapadd -x -D cn=Manager,dc=curso,dc=local -W -f basedomain.ldif
service slapd restart