Disable Cron Pam_Unix Session
Step
Use
sudo vim /etc/pam.d/common-session-noninteractive
to edit the settingsFind this line
session required pam_unix.so
Then add the following script on top of this line
session [success=1 default=ignore] pam_succeed_if.so service in cron quiet use_uid
Restart cron service
sudo service cron restart
Finish