The Setup:

1) The user's password was deleted with "passwd -d " command

2) The user has cron jobs running

The Problem:
Once every 30 days (default password expiration policy) the cron fails with an error

Authentication token is no longer valid; new one required
ERROR: failed to open PAM security session: Success
ERROR: cannot set security context

My Questions:
Is there a way to prevent this from happening?
Why is the authentication token expired for a user with deleted password?

link|improve this question
feedback

1 Answer

It sounds like your system removed the password but did not clear the password expiration requirements.

If this is the case you can clear these manually using vipw -- The affected field will either be in the passwd file or the shadow file depending on your OS (See man 5 passwd and man 5 shadow for details on the file formats so you know which field(s) you need to clear)

link|improve this answer
If you update your question to include a specific OS tag and leave a comment here and I'll come back and update this answer with specifics for your OS. – voretaq7 Jan 26 at 8:09
Thanks, that helped! – Aleksey Sanin Feb 2 at 7:32
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.