Skip to content

Instantly share code, notes, and snippets.

@carry0987
Last active August 17, 2018 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carry0987/73154cd7eba7066974de626672e2a39a to your computer and use it in GitHub Desktop.
Save carry0987/73154cd7eba7066974de626672e2a39a to your computer and use it in GitHub Desktop.
RPi3-Disable-Cron-Pam-Unix-Session

RPi3 Disable Cron Pam_Unix Session

Step

  1. Use sudo vim /etc/pam.d/common-session-noninteractive to edit the settings

  2. Find this line

    session required pam_unix.so
    

  3. 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
    

  4. Restart cron service

    sudo service cron restart
    

  5. Finish

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment