Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.