Another Solaris item learned

After spending many hours, literally, in trying to figure out why a cron job wasn’t running, I finally stumbled upon the answer. Since this blog is more often than not used as my memory stick (the ram in my brain is beginning to fail), I thought I’d explain the issue and the solution I found.

We recently upgraded a server from Solaris 8 to Solaris 10 using LiveUpgrade. Not a bad way to do things, if you ask me. Once the server was brought up in Solaris 10, one of my users’ crontabs stopped working. In this case, it wasn’t critical, but it was a real pain to catch up what the cron missed (after being gone from the office for 2 weeks.) I tried all kinds of things (except the ones that put me on the path to recovery) including adding test entries to the crontab and seeing if they’d run. They didn’t.

Off to Google I ran. I discovered that our servers are logging cron runs (the log files reside at /var/cron/log), and I hadn’t thought of looking at them until about 15 minutes before the epiphany. I went to set up the servers to log cron runs, because most servers are installed without cron logging. I discovered it was turned on. So, I checked the logs, and found that I was getting the error

! bad user (username) Wed Jul 21 13:38:00 2010

The user is valid, so back to Google. The first answer I found said that you probably have a problem with the user in /etc/passwd or /etc/shadow. The user was in both files, but had been locked using “passwd -l username” – This did not cause any issues in Solaris 8, but once we turned up Solaris 10, the cron jobs ceased running.

The bottom line that I found with this problem is that in Solaris 10, the new security will not allow a user with a locked account to run cron jobs. I assigned a regular password to the user and life is grand once again.

The Geek In Me

Hi, my name is Steve and I’m a geek. Is there a 12-step program for me? No, really, I like being a techie. I work at a job where I manage Solaris servers, databases (I prefer MySQL), and write web pages. I do web pages as my business, as well. I like to code my pages in PHP (that’s a web programming language) and have them talk to MySQL databases.

Someone once asked me what I used to create my web pages. My answer? vi. Google it if you don’t know what it is. I’m a geek!