I'm trying to get to the bottom of an issue with a non-root user running a cron job and I've stumbled upon /etc/security/access.conf
. I have a couple of questions:
- What service reads this file?
- Do I need to restart anything after editing it?
- How do I know it's even being used?
Thanks
To see which PAM-based services are using it:
If it's not mentioned in
/etc/pam.d/cron
(which I suspect it won't be) then it shouldn't be having any effect on cron jobs. If there are any@include
directives in thepam.d
files, follow them to make sure you don't miss anything.[1] What service reads this file? It is used by pam
[2] Do I need to restart anything after editing it?
Nothing to restart. Once changed, on subsequent login event, the file is read.
[3] How do I know it's even being used?
For more details, do man access.conf.
The other two answers are very good, but miss something I wish I understood yesterday.
Access.conf is indeed used by pam_access.so, but so what? You really need to know if pam_access.so is being used during login. Check for it here:
Here is the thing: Do not edit these files to add/remove pam_access.so. Other services may overwrite those changes. You have to dive into the dark arts of authentication to change these things... doing so without full understanding can lead to a burned tush.
But the others are correct: changes to access.conf are immediate, requiring no reboot nor service restart.