sysadmin:ldap
Differences
This shows you the differences between two versions of the page.
| sysadmin:ldap [2026/02/04 21:58] – created mlivolsi | sysadmin:ldap [2026/05/20 14:22] (current) – mlivolsi | ||
|---|---|---|---|
| Line 3: | Line 3: | ||
| aka. Sanity check that ldap is working for a user | aka. Sanity check that ldap is working for a user | ||
| + | === Syntax ==== | ||
| < | < | ||
| ldapsearch -x -H " | ldapsearch -x -H " | ||
| </ | </ | ||
| - | Example | + | === Example |
| < | < | ||
| - | ldapsearch -x -H " | + | ldapsearch -x -H " |
| </ | </ | ||
| + | |||
| + | === Better Example === | ||
| + | < | ||
| + | ldapsearch \ | ||
| + | -H ldap:// | ||
| + | -x \ | ||
| + | -D " | ||
| + | -W \ | ||
| + | -b " | ||
| + | " | ||
| + | cn | ||
| + | </ | ||
| + | |||
| + | Explanation | ||
| + | |||
| + | - H is the ldap/ad server | ||
| + | - D is the username used to authenticate (signing onto the server) | ||
| + | - b is the tree structure | ||
| + | - userPrincipalName is the field you want to authenticate against | ||
| + | - cn is the field you want returned. | ||
| + | |||
| + | In the example above, you can switch " | ||
| + | |||
| + | cn mail userPrincipalName sAMAccountName objectClass | ||
sysadmin/ldap.1770242288.txt.gz · Last modified: by mlivolsi
