mise au point prepa

This commit is contained in:
2024-09-24 15:45:00 +02:00
parent 3fbbd9c0bc
commit 09b645eb50
5 changed files with 49 additions and 43 deletions

View File

@@ -8,4 +8,16 @@ schemas cosine.ldif core.ldif nis.ldif et inetorgperson.ldif
fichier root.ldif fichier root.ldif
fichier tom.ldif # Préparation
Il est possible d'avoir un serveur ldap en cours de fonctionnement très rapidement:
```bash
sudo dnf install podman
sudo systemctl enable --now podman
sudo podman run -p 389:389 --name openldap-server --uts=private --hostname=localhost \
--env LDAP_ORGANISATION="example" --env LDAP_DOMAIN="example.fr" \
--env LDAP_ADMIN_PASSWORD="admin" --env LDAP_TLS=false \
--env LDAP_BASE_DN="cn=admin,dc=example,dc=fr" -d osixia/openldap:latest
ldapadd -H ldap://localhost:389 -x -f data.ldif -D cn=admin,dc=example,dc=fr -wadmin -c
```

View File

@@ -1,12 +0,0 @@
dn: olcDatabase={2}mdb,cn=config
changetype: modify
replace: olcsuffix
olcsuffix: dc=example,dc=fr
-
replace: olcrootdn
olcrootdn: cn=manager,dc=example,dc=fr
-
replace: olcrootpw
#123Soleil
olcrootpw: {SSHA}bWn23pdsB6At2dH2sZN3L5HxqiV17NpF

36
data.ldif Normal file
View File

@@ -0,0 +1,36 @@
# fichier à injecter dans le serveur de démo
dn: dc=example,dc=fr
objectClass: top
objectClass: dcObject
objectClass: organization
o: example
dc: example
dn: ou=hosts,dc=example,dc=fr
objectClass: organizationalUnit
ou: hosts
dn: ou=users,dc=example,dc=fr
objectClass: organizationalUnit
ou: users
dn: ou=groups,dc=example,dc=fr
objectClass: organizationalUnit
ou: groups
dn: uid=thomas,ou=users,dc=example,dc=fr
objectClass: inetOrgPerson
objectClass: posixAccount
displayName: Thomas Constans
givenName: Thomas
cn: Thomas
sn: Constans
mail: thomas@opendoor.fr
userPassword:: VmVudGlsYXRldXIyMiU=
gidNumber: 1238
uidNumber: 1234
homeDirectory: /home/thomas
loginShell: /bin/bash
uid: thomas

View File

@@ -1,17 +0,0 @@
# the root and top branches of our DIT
dn: dc=example,dc=fr
objectClass: domain
description: This is
the root of our DIT
dn: ou=Hosts,dc=example,dc=fr
objectClass: organizationalUnit
dn: ou=Users,dc=example,dc=fr
objectClass: organizationalUnit
dn: ou=Groups,dc=example,dc=fr
objectClass: organizationalUnit

13
tom.yml
View File

@@ -1,13 +0,0 @@
dn: uid=tom,ou=users,dc=example,dc=fr
objectClass: inetOrgPerson
objectClass: posixAccount
displayName: Thomas Constans
givenName: Thomas
cn: Thomas
sn: Constans
mail: tom@opendoor.fr
userPassword: Ventilateur22%
gidNumber: 1238
uidNumber: 1234
homeDirectory: /home/tom
loginShell: /bin/bash