admin / ldapconfig

Last active 1 month ago

Like 0

Revision bfda87a450da50c68f38172d91b650ad825a035c

ldapconfig Raw
1If it's plain OpenLDAP
2The libpam-ldapd route is the least painful because the installer prompts you interactively and auto-configures nsswitch.conf + PAM:
3
4sudo apt install libnss-ldapd libpam-ldapd
5
6When it prompts, just fill in:
7
8LDAP server URI: ldap://your-server:389
9Search base: dc=example,dc=com
10Check passwd, group, shadow
11Then set the bind DN/password:
12
13sudo nano /etc/nslcd.conf
14
15binddn "cn=readonly,dc=example,dc=com"
16bindpw your-password
17
18sudo systemctl restart nslcd
19sudo reboot
20
21
22# /etc/nslcd.conf
23# nslcd configuration file. See nslcd.conf(5)
24# for details.
25
26# The user and group nslcd should run as.
27uid nslcd
28gid nslcd
29
30# The location at which the LDAP server(s) should be reachable.
31uri ldap://10.3.12.13:3189
32
33# The search base that will be used for all queries.
34base dc=rhodiumlab,dc=org
35
36# The LDAP protocol version to use.
37#ldap_version 3
38
39# The DN to bind with for normal lookups.
40binddn cn=admin,dc=rhodiumlab,dc=org
41bindpw "password"
42
43# The DN used for password modifications by root.
44#rootpwmoddn cn=admin,dc=example,dc=com
45
46# SSL options
47#ssl off
48#tls_reqcert never
49tls_cacertfile /etc/ssl/certs/ca-certificates.crt
50
51# The search scope.
52#scope sub
53
54
55