BackupPC-users

Re: [BackupPC-users] sudoers

2009-01-22 13:16:29
Subject: Re: [BackupPC-users] sudoers
From: Rob Owens <rowens AT ptd DOT net>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Thu, 22 Jan 2009 13:14:37 -0500
On Wed, Jan 21, 2009 at 10:15:43PM -0600, Terri Kelley wrote:
> Ok, apparently I am particularly dense tonight. I have had the  
> following error when setting up a host:
> 
> > Remote[1]: rsync: push_dir#3 "/home/backuppc/15" failed: No such file
> > or directory (2)
> > Remote[1]: rsync error: errors selecting input/output files, dirs
> > (code 3) at main.c(602) [sender=2.6.8]
> > Read EOF:
> > Tried again: got 0 bytes
> > fileListReceive() failed
> 
> The above directory doesn't exist and shouldn't and I don't have it  
> anywhere in backuppc for that host.
> 
> So I am trying to test using rsync via command line from the backuppc  
> server to test the problem. The host server automatically backs up its  
> files to a directory/files owned etc by root and I am trying to backup  
> that host to backuppc. If I rsync from the backuppc server as root,  
> that works. So I am trying to rsync as backuppc user. I have entered  
> the following in visudo on the host:
> 
> ## 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 think that last line is right.  You are supposed to list a command that 
the user can run, and "/root/backups/" is not a command.

You seem to want to give user "backuppc" read access to /root/backups/, but is 
not being accomplished.  If you want to specify a specific path that backuppc 
is allowed to back up, you need something like:

ALL=NOPASSWD: /usr/bin/rsync --server --sender *

Only you should replace the * with the specific switches and paths that you 
need.  You can find them by running the backup as root, and doing "ps aux" on 
the host machine to see the exact rsync command that is being run.  I believe 
you can also find that command in the BackupPC log files.

-Rob

------------------------------------------------------------------------------
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 AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>