-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Terri Kelley wrote: > ## Allow root to run any commands anywhere > root ALL=(ALL) ALL > backuppc ALL=NOPASSWD:/usr/local/bin/backuppc-rsync > backuppc ALL=NOPASSWD:/root/backups/
I don't know what /root/backups/ is doing here.. sudoers is which commands a user should be able to execute as root... nothing else! You do not need that line. > The /root/backups/ (tried with and without the last /) is where the > server makes it backups in other directories and is owned by root. > From the console on the backuppc server I issue the following command: > rsync -avz -e "ssh -p 22" myserver.domain.net:/root/backups /var/tmp/ > pwrnctmpback/rsyncmanual Try something like this: rsync -avz -e "/usr/bin/sudo /usr/local/bin/backuppc-rsync" backu...@myserver.domain.net:/root/backups /var/tmp/pwrnctmpback/rsyncmanual This says to login to the remote machine as user backuppc, then run the command /usr/bin/sudo (change that depending on where your sudo command is), which will give you root access and call /usr/local/bin/backuppc-rsync for you. Assuming /usr/local/bin/backuppc-rsync is a copy of a normal rsync binary, this will do what you need, although you don't actually need to use a non-standard path/binary. You could just as easily list /usr/bin/rsync in the sudoers file, and call the normal /usr/bin/rsync instead. > And I get the following: > receiving file list ... rsync: link_stat "/root/backups" failed: > Permission denied (13) > done > > So obviously doing it that way, backuppc user, does not work. You didn't call sudo, therefore you never got root permissions... Hope that helps. Regards, Adam - -- Adam Goryachev Website Managers Ph: +61 2 8304 0000 a...@websitemanagers.com.au Fax: +61 2 8304 0001 www.websitemanagers.com.au - -- Adam Goryachev Website Managers www.websitemanagers.com.au -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkl39sAACgkQGyoxogrTyiWzLACgnVC7EGie5j9z1yg7M5oeOtIy WYMAoLOCFwawVgvddDhQrzWO03qEB5QB =rJFo -----END PGP SIGNATURE----- ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List: https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki: http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/