Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

My crontab not executed

Status
Not open for further replies.

teqmem

Programmer
Nov 26, 2004
114
0
0
US
Hello,

I'm on Solaris 10 and I can see that '/usr/sbin/cron' is running. '/etc/cron.d/cron.allow' has my user account listed. '/etc/cron.d/cron.deny' doesn't have my user account listed.

I created my crontab using 'crontab -e' and put a line like:
* * * * * my.sh > my.log 2>&1

And 'my.sh' is on my home dir with +x and I can can execute 'my.sh' manually. However, my crontab is not being executed.

Where do I look for the problem?

Thanks.
 
/var/cron/log says:

> appladmi 14862 c Fri Jan 25 18:22:00 2008
! bad user (appladmin) Fri Jan 25 18:22:00 2008

I noticed that the 1st line of the user name has the last char missing while the next line is complete.

The system administrator on this box setup the user account and I believe this server is using kerberos-type authentication.

I login using the full version (appladmin). So how do I correct it? I can do full root-type functions if I know where to go.

Thanks.
 
Don't worry about the truncation, it only logs the first 8 characters.

Are you using RBAC or the profile shell? What is appladmin's shell in /etc/passwd?

What happens when (as root) you go:
su - appladmin
?

eugene
 
I changed the username in '/etc/passwd' to 'appladm' to remove any length issue.
appladm:x:10046:10003::/home/appladm:/bin/ksh

The /var/cron/log now says:
> CMD: /home/appladm/t1.sh > /home/appladm/t1.log 2>&1

I also modified my crontab to use full path:
* * * * * /home/appladm/t1.sh > /home/appladm/t1.log 2>&1

t1.sh just do simple 'ps -ef'; however, the log is never created so it doesn't seem that my t1.sh was actually executed.

How can I tell if RBAC is used? I'm an AIX guy and I'm getting on a Solaris box for the first time in years.

Thanks.
 
Works now.

I tried several things but it seems to work only after I changed the password of this user as I only 'su' to this user.

Thanks.
 
Was the string like LK for the password? Some strings in the password file indicate a locked account, and that essentially makes the account non-existent. Try putting a simple * as the password.
eugene
 
Sorry, I meant the password entry in the shadow file.
I believe the account lock string might be *LK*. As long as it isn't blank, and < 14 character the password cannot be matched.

eugene
 
I didn't setup the account so I don't know the initial password (used us only).

The crontab for this user is now working as expected. Some real background jobs are now running.

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top