cronjob dies when user password expires


 
Thread Tools Search this Thread
Operating Systems Solaris cronjob dies when user password expires
# 1  
Old 02-01-2007
cronjob dies when user password expires

I noticed for some time now on solaris 8 whenever our root or oracle password expires after 12 weeks the cronjob for the expired user will totally stop working, it will start working again once the password has been changed.

I wonder if anybody encountered this problem and knows of a fix other than extending expiry period.

this is the /var/cron/log

! bad user (oracle) Fri Feb 2 08:00:00 2007
< oracle 3769 c Fri Feb 2 08:00:00 2007 rc=1

this is the /etc/default/passwd
#ident "@(#)passwd.dfl 1.3 92/07/14 SMI"
MAXWEEKS=12
MINWEEKS=1
PASSLENGTH=8
# 2  
Old 02-02-2007
the problem is you cannot switch to a user (like cron does) and run programs when the password is expired, because you are prompted to change it

you can check the "ADMCHG" Flag in /etc/security/passwd with a rootcron first, and remove it (just works for the oracle user)

for root you just can turn the password-policy off afaik
# 3  
Old 02-02-2007
Actually I have wondered why Solaris does this for some time. Thanks to Open Solaris I can find the answer. It seems that Sun modified cron to use PAM and introduced this behavior in the process. So I suppose that you could probably write your own PAM module to allow expired users to run cronjobs.

I really like Open Solaris... no more mysteries. Smilie
# 4  
Old 02-04-2007
yeah,

it is not actually a problem, it was designed to run that way. Best way to get around it would turn the password policy off for root to reset every 12 weeks.

Why would you want expired accounts to have access to run things?


you wouldn't, so its design is correct.
# 5  
Old 02-05-2007
It is for this reason i wrote the pwage script, that I posted here:
Check Password Age
Tornado
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cronjob for root password change.

Hi, I am writing a cronjob which changes default root password to some designated password(set) after 15 days. The requirement for same is because i need to give application team root access for first 15 days, but after that the default password should be changed, now I want to automate the... (3 Replies)
Discussion started by: nixhead
3 Replies

2. UNIX for Dummies Questions & Answers

Script does not run from a user specific cronjob.

Hello, I have two crontabs, one for the root and one for another user. There is a script in my configurations that has to send a email. The script works and sends the emails when I run it by hand with either the root or the user, and when I program it in the root's crontab. But! It does not... (3 Replies)
Discussion started by: Tralaraloro
3 Replies

3. Red Hat

Cronjob not working at user timezone

I have created user and set timezone different from root user timezone in .bash_profile of user using TZ command, i have created cronjob for user using crontab -e, my concern is that job schedule in cronjob must executive as per timezone of user , but i am getting that job schedule in cron of user... (6 Replies)
Discussion started by: Mahenaaz
6 Replies

4. Shell Programming and Scripting

Cronjob not working from user's crontab

Hi All, I am trying to execute a python script from a user's crontab. /home/user1/UDE/scripts/UdeManager.py I am at /home/user1. If I run the command "/home/user1UDE/scripts/UdeManager.py" from the users home directory its working fine. But when I try to run from user's cron tab its... (3 Replies)
Discussion started by: Tuxidow
3 Replies

5. Solaris

Check when password expires

How do I check to see when a password expires on a user account with using the CLI? (1 Reply)
Discussion started by: jastanle84
1 Replies

6. Shell Programming and Scripting

cronjob on a remote ssh without typing password

Hi there, How can I send a script to a remote ssh client. 1) I cannot connect through ftp 2) I just need to read a file on a remote server. Here is what I do: ~$ ssh santiago@myserver.com santiago@myserver.com's password: santiago@myserver:~$ cat logfile hello world bonjour le monde hola... (1 Reply)
Discussion started by: chebarbudo
1 Replies

7. UNIX for Advanced & Expert Users

password verification verify password of a user for only first 8 characters

Helo , I m using linux pam library for user and its password authentication. I m creating new user and giving its password.I m giving password of 10 characters.now when I login in as that newly created user its ask me $ su - ram Password: You are required to change your password immediately... (12 Replies)
Discussion started by: amitpansuria
12 Replies

8. UNIX for Dummies Questions & Answers

Change Account to not lock account if password expires

I have access to 15+ UNIX boxes at work, and I do not consistently log onto all of them over time. When I do try to access one I havent been on in awhile, my account is locked as the password has expired. I need to request to the UNIX SA's that the password expiration is 90 days and that if it... (1 Reply)
Discussion started by: stringzz
1 Replies

9. UNIX for Advanced & Expert Users

HOw do i give a user cronjob edit/settings permission?

Hi, In a Unix Server when i 'su' to my name and type in crontab it says " You are not authorised......". Pls suggest what to do? How do i give myself permission so that I can schedule a cron. (2 Replies)
Discussion started by: debu
2 Replies

10. Solaris

How to run a script as different user inside cronjob in solaris.

Hi , I have a shell script to perform some actions on sun solaris box . This script normally requires to be run as a different user. so, whenever i have to run this script, i need to sudo in as that user , enter the password and execute it. Now,I have to setup a cronjob to execute the script... (11 Replies)
Discussion started by: csg_user
11 Replies
Login or Register to Ask a Question