ProByte.org Linux tutorials

How to resolve: pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)

I noticed that the line “pam_unix(cron:session): session opened for user root(uid=0) by (uid=0)” is getting spammed into /var/log/auth.log

I consider this unnecessary. We want to keep auth.log as clear as possible.

Solution to stop this :

Edit file /etc/pam.d/common-session-noninteractive and add this line to the top of the file.

session [success=1 default=ignore] pam_succeed_if.so service in cron quiet use_uid

and then simply restart cron service.

sudo service cron restart

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *