How to get full control of umask/PAM/permissions?

Many things could be going on here. First thoughts: yes, pam.d changes take effect immediately /etc/pam.d/common-session is the best place to set a default umask any pam.d umask would get overridden by any entry in .bashrc, but .bashrc only gets read under certain circumstances (interactive, non-login shell) testfile (711) is very strange how is /home … Read more

LDAP authentication on CentOS 7

Running nslcd in debug mode shows the problem: $ $(which nslcd) -d … nslcd: [8b4567] <authc=”user.name”> DEBUG: myldap_search(base=”dc=sub,dc=example,dc=org”, filter=”(&(objectClass=posixAccount)(uid=user.name))”) … nslcd: [8b4567] <authc=”user.name”> DEBUG: ldap_result(): end of results (0 total) nslcd: [8b4567] <authc=”user.name”> DEBUG: “user.name”: user not found: No such object … nslcd sets a filter by default. It’s not possible to remove this filter … Read more

OpenLDAP, Samba and password aging

I wrote my own OpenLDAP overlay called shadowlastchange to update the shadowLastChange attribute whenever an EXOP password change occurs. It is activated in slapd.conf: moduleload smbk5pwd moduleload shadowlastchange … database bdb … overlay smbk5pwd overlay shadowlastchange I have configured smb.conf to change passwords via EXOP: ldap passwd sync = Only Then, for each account, set … Read more

Restricting account logins using LDAP and PAM

PAM has the ability to restrict access based on an access control list (at least on Ubuntu) which, like kubanskamac’s answer (+1) regards the groups as posix groups, whether they’re stored in LDAP, /etc/group or NIS. /etc/security/access.conf is the access list file. In my file, I put at the end: -:ALL EXCEPT root sysadmin (ssh-users):ALL … Read more

The difference between /etc/pam.d/login and /etc/pam.d/system-auth?

The /etc/pam.d/system-auth file is used by Red-Hat and like systems to group together common security policies. It is often included in other /etc/pam.d policy files where those common policies are required. When accessing a system via ssh through sshd, the /etc/pam.d/sshd policy file is consulted. This file includes /etc/pam.d/system-auth so your changes to /etc/pam.d/system-auth are … Read more