2020-04-19 13:01:39 +02:00
|
|
|
# LDAP (389 Directory Server)
|
2019-12-06 10:54:10 +01:00
|
|
|
|
2020-04-19 13:01:39 +02:00
|
|
|
## Credentials
|
2019-12-06 10:54:10 +01:00
|
|
|
|
|
|
|
|
The admin account is `cn=Directory Manager` with the password stored in the
|
|
|
|
|
encrypted data bag `admin_password` item
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
$ knife data bag show credentials dirsrv --secret-file .chef/encrypted_data_bag_secret
|
|
|
|
|
```
|
|
|
|
|
|
2020-04-19 13:01:39 +02:00
|
|
|
## Example search (will prompt for password):
|
2019-12-06 10:54:10 +01:00
|
|
|
|
|
|
|
|
```
|
2020-09-16 11:36:29 +02:00
|
|
|
$ ldapsearch -x -W -D 'cn=Directory Manager' -b "ou=kosmos.org,cn=users,dc=kosmos,dc=org" -H "ldaps://ldap.kosmos.org" -v
|
2019-12-06 10:54:10 +01:00
|
|
|
```
|
2020-09-15 13:04:54 +02:00
|
|
|
|
|
|
|
|
## Shell scripts
|
|
|
|
|
|
|
|
|
|
Adding a new user account (requires username, email, password):
|
|
|
|
|
|
|
|
|
|
./scripts/ldap/add_user.sh username user@example.com changeme
|