Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Ubuntu server and sudo

  1. #11
    Join Date
    Oct 2008
    Location
    New York
    Beans
    2,649
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Ubuntu server and sudo

    Quote Originally Posted by CharlesA View Post
    I use a rsync script in a root crontab.

    Same here
    My Launchpad
    ----------------------------------------------------------------------------------------
    My Wiki Page

  2. #12
    Join Date
    Nov 2006
    Location
    Belgium
    Beans
    3,023
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Ubuntu server and sudo

    Quote Originally Posted by pmatos View Post
    ... the whole point was to do this with sudo through the sudoers file by allowing backuppc act as root when using /bin/tar. ....
    AFAIK, there's nothing in your script or in your sudoers file that makes the tar command run with root privileges :

    - your script says "switch user to baccuppc and run /bin/tar"
    - your sudoers file says that "backuppc" would be allowed to switch user to root and run /bin/tar"
    but there is nothing there that makes that "switch user to root" actually happen - and backuppc has insufficient access rights to tar your files



    although I could be wrong, I've never seen a sudoers file in my life and am going by what I can understand from the man page.



    ----
    EDIT:

    Apart from that, I agree with the others here: leave those sudo commands out of your script and run the entire script as root (via sudo) or from a root crontab.
    Alternatively, give the backuppc account sufficient access rights (eg through groups)
    Last edited by koenn; January 9th, 2011 at 10:32 PM.

Page 2 of 2 FirstFirst 12

Tags for this Thread

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
  •