Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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)

share|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 '12 at 8:09
Thanks, that helped! – Aleksey Sanin Feb 2 '12 at 7:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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