Update INSTALL.md
This commit is contained in:
parent
bc756762f4
commit
d32c3b4dad
48
INSTALL.md
48
INSTALL.md
@ -12,16 +12,57 @@ build ldapdock from the dockerfile and run into it
|
||||
```
|
||||
|
||||
```
|
||||
> docker run -h example.com -i -p 389:389 -t ldapdock -v ldap_data:/var/lib/ldap -v ldap_config:/etc/ldap/slapd.d
|
||||
> docker run -h example.com -i -p 389:389 -t ldapdock
|
||||
```
|
||||
|
||||
## _2- Run the openLDAP server and create an admin user_
|
||||
## _2- Run the openLDAP server and populate a directory_
|
||||
|
||||
Use the following command to start openLDAP
|
||||
```
|
||||
root@example:/# slapd -h "ldap:/// ldapi:///" -g openldap -u openldap -F /etc/ldap/slapd.d
|
||||
```
|
||||
Generate a password hash for our administrator user, Op3nLd4p! here being the password to comply with password policies
|
||||
|
||||
Create some groups and users to populate a directory
|
||||
```
|
||||
root@example:/# cat > add_content.ldif << EOF
|
||||
dn: ou=People,dc=example,dc=com
|
||||
objectClass: organizationalUnit
|
||||
ou: People
|
||||
|
||||
dn: ou=Groups,dc=example,dc=com
|
||||
objectClass: organizationalUnit
|
||||
ou: Groups
|
||||
|
||||
dn: cn=mages,ou=Groups,dc=example,dc=com
|
||||
objectClass: posixGroup
|
||||
cn: mages
|
||||
gidNumber: 5000
|
||||
memberUid: marisa
|
||||
|
||||
dn: uid=marisa,ou=People,dc=example,dc=com
|
||||
objectClass: inetOrgPerson
|
||||
objectClass: posixAccount
|
||||
objectClass: shadowAccount
|
||||
uid: marisa
|
||||
sn: Kirisame
|
||||
givenName: Marisa
|
||||
cn: Marisa Kirisame
|
||||
displayName: Marisa Kirisame
|
||||
uidNumber: 10000
|
||||
gidNumber: 5000
|
||||
userPassword: {CRYPT}x
|
||||
gecos: Marisa Kirisame
|
||||
loginShell: /bin/bash
|
||||
homeDirectory: /home/marisa
|
||||
EOF
|
||||
```
|
||||
```
|
||||
root@example:/etc/ldap/slapd.d# ldapadd -x -D cn=admin,dc=example,dc=com -W -f add_content.ldif
|
||||
```
|
||||
When creating the groups and users, we will be asked:\
|
||||
1-the password for the user marisa (qwerty), 2-reenter the password for marisa, 3-the openLDAP root password (admin)
|
||||
|
||||
<!--Generate a password hash for our administrator user, Op3nLd4p! here being the password to comply with password policies
|
||||
```
|
||||
root@example:/# slappasswd -s Op3nLd4p!
|
||||
{SSHA}vP1xt9t8+/GmOXmqlH1yNh305+MpUDe+
|
||||
@ -44,6 +85,7 @@ root@example:/# ldapadd -x -H ldap:/// -D "cn=admin,dc=example,dc=com" -w Op3nLd
|
||||
adding new entry "cn=admin,dc=example,dc=com"
|
||||
```
|
||||
That's all, our administrator user was properly done.
|
||||
-->
|
||||
|
||||
## _3- Load and enable policy modules_
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user