Operating System - HP-UX
1833523 Members
2925 Online
110061 Solutions
New Discussion

password expired caused cron failure?

 
John Guster
Trusted Contributor

password expired caused cron failure?

The account's password expired. Will it cause its' cron job fail?
7 REPLIES 7
Brian M Welch
Frequent Advisor

Re: password expired caused cron failure?

John,

As long as your user is listed in /usr/lib/cron/cron.allow , the cron job will run regardless of password expiration.

Hope this helps,

Brian
Steven E. Protter
Exalted Contributor

Re: password expired caused cron failure?

Shalom,

Depend how you right the cron job.

If root does an su - username, the cron job will keep running.

If the cron job has to try a password free login via ssh, it will fail.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
John Guster
Trusted Contributor

Re: password expired caused cron failure?

appdev 2783 c Mon Dec 17 01:00:00 2007
> CMD: (. $HOME/.profile; $APPDEV/space_monitor.sh) > /tmp/local/message/log.err 2>&1
! user (appdev) password has expired Mon Dec 17 01:00:00 2007
appdev 2783 c Mon Dec 17 01:00:00 2007 rc=1

this is from the log. is it because it execute the .profile?
Brian M Welch
Frequent Advisor

Re: password expired caused cron failure?

Looks like it. Is there anything in your script that specifies a password or does a su?
Steve Post
Trusted Contributor

Re: password expired caused cron failure?

in a word: YES.

I had this happen. The job would run, but the parts that needed the password working would fail. The part that failed for me was using scp with an embedded pass phrase between two internal hosts. SSH didn't want to work if the password was expired. I didn't blame ssh. It was only doing it's job.
Doug O'Leary
Honored Contributor

Re: password expired caused cron failure?

Hey;

I run into this regularly. If the user's password is expired, as in they can't log in anymore, not just that they have to change it on next login, their cron jobs will fail.

You won't be able to ssh into the account either. You will be able to su into it as root or you can set other users to sudo su -.

The way around this, if you don't want people accessing the account directly, is to set the encrypted password to NP. This is obviously an invalid encrypted password so nobody will be able to log into the account directly. It's also not the '*' for locked accounts so ssh, sudo su, and cron still function.

HTH;

Doug O'Leary

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Steve Post
Trusted Contributor

Re: password expired caused cron failure?

Thanks for the tip Doug.