Alex
01/30/2025, 8:42 AM/etc/nslcd.conf adapted from the sample PAM configuration in the repo, and nscd running on the same box. I'm running nslcd -d in the foreground to see logs. I can query lldap on the seperate container with commands like id and getent, but actually trying to log in keeps giving me "password denied". Even double- and tripple- checking that my password is right. I tried changing passwords to remove all symbols, same thing. Is there something special I have to do to set up passwords?Alex
01/30/2025, 8:43 AM/etc/nslcd.conf
# /etc/nslcd.conf
# nslcd configuration file. See nslcd.conf(5)
# for details.
# The user and group nslcd should run as.
uid nslcd
gid nslcd
# The location at which the LDAP server(s) should be reachable.
uri ldap://10.x.x.x:3890/
# The search base that will be used for all queries.
base dc=auth,dc=example,dc=com
# The LDAP protocol version to use.
#ldap_version 3
# The DN to bind with for normal lookups.
binddn cn=system_nss,ou=people,dc=auth,dc=example,dc=com
bindpw xxpasswordherexx
# The DN used for password modifications by root.
#rootpwmoddn cn=admin,dc=example,dc=com
# SSL options
#ssl off
tls_reqcert demand
tls_cacertfile /etc/cert-ldap.auth.example.com.cert
# The search scope.
#scope sub
reconnect_invalidate passwd group
nss_initgroups_ignoreusers ALLLOCAL
# Do you have users/groups that aren't for linux? These filters determine which user/group objects are used.
filter passwd (&(objectClass=posixAccount)(uid=*))
filter group (&(objectClass=groupOfUniqueNames)(unix-gid=*))
# This check is done AFTER authentication, in the pam "account" stage.
# Regardless of if they used a LDAP password, or an SSH key, if they're an LDAP user, they have to pass this check.
pam_authz_search (&(objectClass=posixAccount)(unix-uid=*)(uid=$username)(memberOf=cn=ssh-users,ou=groups,dc=auth,dc=example,dc=com))
map passwd uid uid
map passwd uidNumber unix-uid
map passwd gidNumber unix-gid
map passwd gecos uid
map passwd homeDirectory "/home/git"
map passwd loginShell unix-shell
map group gidNumber unix-gid
map group memberUid member
nss_min_uid 1000
pam_password_prohibit_message "Please use the forgot password link on https://lldap.example.com/ to change your password."nitnelave
01/30/2025, 8:44 AMAlex
01/30/2025, 8:44 AMAlex
01/30/2025, 8:45 AM/etc/nsswitch.conf
# musl itself does not support NSS, however some third-party DNS
# implementations use the nsswitch.conf file to determine what
# policy to follow.
# Editing this file is not recommended.
hosts: files dns
passwd: ldap
group: ldap
shadow: ldapnitnelave
01/30/2025, 8:45 AMnitnelave
01/30/2025, 8:46 AMunix-uid=* not uid=*)Alex
01/30/2025, 8:48 AMtarget/release/lldap --help, is it a config somewhere?nitnelave
01/30/2025, 8:48 AMnitnelave
01/30/2025, 8:48 AMnitnelave
01/30/2025, 8:53 AMAlex
01/30/2025, 8:54 AMunix-uid attribute on users, and a unix-gid attribute on both users and groups (at the moment), and manually set them to the same thing.nitnelave
01/30/2025, 8:59 AMnitnelave
01/30/2025, 8:59 AMnitnelave
01/30/2025, 8:59 AMAlex
01/30/2025, 9:00 AMAlex
01/30/2025, 9:00 AMnitnelave
01/30/2025, 9:00 AMnitnelave
01/30/2025, 9:00 AMnitnelave
01/30/2025, 9:00 AMnitnelave
01/30/2025, 9:15 AMAlex
01/30/2025, 8:43 PM2025-01-30T20:33:55.494423365+00:00 INFO LDAP request [ 1.48ms | 0.00% / 100.00% ] session_id: 1d3f58fe-59af-4694-8b63-b897c2944f94
" DEBUG โโ ๐ [debug]: | msg: LdapMsg { msgid: 3, op: SearchRequest(LdapSearchRequest { base: "dc=auth,dc=example,dc=com", scope: Subtree, aliases: Never, sizelimit: 0, timelimit: 0, typesonly: false, filter: And([Equality("objectClass", "shadowAccount"), Equality("uid", "user")]), attrs: ["shadowFlag", "shadowMax", "shadowMin", "shadowLastChange", "uid", "shadowExpire", "shadowInactive", "shadowWarning"] }), ctrl: [] }
" DEBUG โโ do_search [ 1.48ms | 23.93% / 100.00% ]
" DEBUG โ โโ ๐ [debug]: | request.base: "dc=auth,dc=example,dc=com" | scope: Global
" DEBUG โ โโ get_user_list [ 410ยตs | 0.00% / 27.64% ]
" DEBUG โ โ โโ ๐ [debug]: | filters: And([Not(And([])), UserId("user")])
" DEBUG โ โ โโ list_users [ 410ยตs | 27.64% ] filters: Some(And([Not(And([])), UserId("user")])) | _get_groups: false
" DEBUG โ โ โโ ๐ [debug]: | return: []
" DEBUG โ โโ get_groups_list [ 718ยตs | 0.13% / 48.43% ]
" DEBUG โ โโ ๐ [debug]: | filters: And([Not(And([])), DisplayName("user")])
" DEBUG โ โโ list_groups [ 716ยตs | 48.30% ] filters: Some(And([Not(And([])), DisplayName("user")]))
" DEBUG โ โโ ๐ [debug]: | return: []
" DEBUG โโ ๐ [debug]: | response: SearchResultDone(LdapResult { code: Success, matcheddn: "", message: "", referral: [] })
I read this as it's looking for a shadowAccount objectclass on the user (that I don't have set). I can't figure out where to add it in the web UInitnelave
01/30/2025, 8:45 PM