Skip to content

Commit

Permalink
Update slapd.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrl39 authored May 25, 2024
1 parent e6a6083 commit aa38f8c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/scripts/slapd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,16 @@ sudo netstat -tulnp | grep slapd

# Realizar una consulta LDAP simple para verificar el funcionamiento
ldapsearch -x -H ldap://localhost -b dc=doncom,dc=com

# Crear un archivo LDIF para el usuario admin
cat <<EOF > admin.ldif
dn: cn=admin,dc=doncom,dc=com
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
userPassword: $(slappasswd -s davidtomas)
EOF

# Añadir el usuario admin al LDAP
ldapadd -x -D "cn=admin,dc=doncom,dc=com" -w davidtomas -f admin.ldif

0 comments on commit aa38f8c

Please sign in to comment.