Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| wiki:freebsd:set_up_ldap_auth_freebsd [2025/01/07 12:36] – removed - external edit (Unknown date) 127.0.0.1 | wiki:freebsd:set_up_ldap_auth_freebsd [2025/01/07 12:36] (current) – ↷ Page moved from wiki:linux:install_davinci_resolve:wiki:freebsd:set_up_ldap_auth_freebsd to wiki:freebsd:set_up_ldap_auth_freebsd Greg | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Configuring LDAP Auth on FreeBSD ====== | ||
| + | ===== Install NSS LDAP Package ===== | ||
| + | |||
| + | < | ||
| + | pkg install nss-pam-ldapd | ||
| + | </ | ||
| + | |||
| + | ===== Configure NSLCD ===== | ||
| + | |||
| + | Edit / | ||
| + | |||
| + | < | ||
| + | ... | ||
| + | uri ldap:// | ||
| + | ldap_version 3 | ||
| + | base dc=example, | ||
| + | scope sub | ||
| + | ssl no | ||
| + | </ | ||
| + | |||
| + | Restart nslcd service: | ||
| + | |||
| + | < | ||
| + | service nslcd restart | ||
| + | </ | ||
| + | |||
| + | ===== Configure PAM ===== | ||
| + | |||
| + | Edit / | ||
| + | |||
| + | **Note:** For brevity I'm only showing the pam_ldap and pam_unix lines so you know where they need to be in relation to each other. | ||
| + | |||
| + | < | ||
| + | ... | ||
| + | auth sufficient / | ||
| + | auth required pam_unix.so no_warn try_first_pass nullok | ||
| + | |||
| + | ... | ||
| + | account required pam_unix.so | ||
| + | account required / | ||
| + | |||
| + | |||
| + | ... | ||
| + | password sufficient / | ||
| + | password required pam_unix.so no_warn try_first_pass | ||
| + | </ | ||
| + | |||
| + | And similar changes to / | ||
| + | |||
| + | < | ||
| + | ... | ||
| + | auth sufficient / | ||
| + | auth required pam_unix.so no_warn try_first_pass | ||
| + | |||
| + | ... | ||
| + | account required pam_unix.so | ||
| + | account required / | ||
| + | |||
| + | ... | ||
| + | password sufficient / | ||
| + | password required pam_unix.so no_warn try_first_pass | ||
| + | </ | ||
| + | |||
| + | ===== Configure NSSwitch ===== | ||
| + | |||
| + | Edit / | ||
| + | |||
| + | < | ||
| + | ... | ||
| + | group: files ldap | ||
| + | ... | ||
| + | passwd: files ldap | ||
| + | ... | ||
| + | </ | ||
| + | |||
| + | ===== Testing the Connection ===== | ||
| + | |||
| + | You can test it by trying to see a user's ID is available: | ||
| + | |||
| + | < | ||
| + | id exampleuser | ||
| + | </ | ||
| + | |||
| + | You can also try using **getent**: | ||
| + | |||
| + | < | ||
| + | getent passwd exampleuser | ||
| + | </ | ||
| + | |||
| + | In both cases you should get some sort of valid output, and in the latter you should see an " | ||
| + | |||
| + | Hurrah! Have fun with your FreeBSD LDAP setup! | ||