Results 1 to 4 of 4

Thread: Root's crontab doesn't work with locked root account

  1. #1
    Join Date
    Nov 2007
    Location
    PWM
    Beans
    75

    Root's crontab doesn't work with locked root account

    I just noticed that the commands I've got running in root's crontab aren't working. My syslog seemed to be saying that the problem was that root had an expired account:

    Code:
    Jul 14 09:44:01 meadows-server CRON[24997]: User account has expired
    When I reenabled the root account with passwd -u, everything works - but now my root account is enabled. How do I disable the root account and have crontab work? Obviously passwd -l disables it but also marks it as expired, which puts me back at square 1.

    I'm running Ubuntu Hardy AMD64.

  2. #2
    Join Date
    Oct 2007
    Location
    $HOME
    Beans
    631

    Re: Root's crontab doesn't work with locked root account

    you can set an absurd password, (say the md5sum of a word), that way the root account ought to be pretty safe. and it won't be deactivatedd too, thereby allowing you to run the root's crontab.

    however, remember to set your username (or any other), in suoders file with all permissions, username ALL=(ALL) ALL

  3. #3
    Join Date
    Nov 2007
    Location
    PWM
    Beans
    75

    Re: Root's crontab doesn't work with locked root account

    Good point - though if Ubuntu ships with root disabled, and using root's crontab is the preferred way to do things (over editing /etc/crontab), then isn't this a pretty big oops?

  4. #4
    Join Date
    Apr 2008
    Beans
    8

    Re: Root's crontab doesn't work with locked root account

    Quote Originally Posted by gfunkdave View Post
    Good point - though if Ubuntu ships with root disabled, and using root's crontab is the preferred way to do things (over editing /etc/crontab), then isn't this a pretty big oops?
    This link helped me get the resolution to this:


    ubuntuforums.org

    The code from cdenley got me most of the way, then I hand edited the /etc/shadow entry for root removing the '1' in the 2nd to last field of this file. That field indicates how many days since January 1st 1970 that the account in question has been disabled:

    http://tldp.org

    -mhmjr

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •