BackupPC-users

Re: [BackupPC-users] sudoers

2009-01-22 22:18:46
Subject: Re: [BackupPC-users] sudoers
From: Terri Kelley <neteng AT farm-market DOT net>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Thu, 22 Jan 2009 21:16:41 -0600
Adam and Rob,

Thanks for the help...

On Jan 22, 2009, at 6:31 PM, Adam Goryachev wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Terri Kelley wrote:
>> On Jan 22, 2009, at 12:14 PM, Rob Owens wrote:
>>
>>> On Wed, Jan 21, 2009 at 10:15:43PM -0600, Terri Kelley wrote:
>>>>
>>> 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 *
>>
>> The backuppc-rsync above refers to the following script:
>>
>> #!/bin/sh -f
>> exec /usr/bin/rsync --server --sender $*
>
> I would advise changing your sudoers to specify /usr/bin/rsync,  
> manually
> test, when that works, then change the sudoers to "/usr/bin/rsync
> - --server --sender *" and test with backuppc...
>
> ie, your script is not needed, and is complicating matters for you.

Y'all (yes, thats a word) were right. Making it harder than needed.

Setting up sudoers with backuppc=NOPASSWD:/usr/bin/rsync --server -- 
sender * on the host.
and then the following manually from backuppc:
rsync -avz -e "ssh -p 22 -l backuppc" --rsync-path "/usr/bin/sudo /usr/ 
bin/rsync" myserver.domain.net:/root/backups /var/tmp/pwrnctmpback/ 
rsyncmanual

worked.

Just for others in case they run across this, I had already backed up  
the /root/backups as root using rsync and when I ran the above as  
"backuppc" got an rsync: failed to set times on ... error. Well the  
files I had backed up were owned by root of course. So I chown to  
backuppc and re-ran the above at it worked doing nothing to the files  
already there but copying over the test file I had placed in the host  
in that directory. I drop this note in here because who knows, someone  
else may find part of it helpful.

Of course the final test is when the host does its backups tonight and  
I add the host to backuppc tomorrow. Right now it is running other  
backups so will leave it to it.

Just fyi, the original settings and scripts are working on the other  
servers so it is curious that it didn't on this one.

Thanks again guys.

Terri Kelley
Network Engineer



>
>
> Regards,
> Adam
>
> - --
> 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
>
> iEYEARECAAYFAkl5D9kACgkQGyoxogrTyiWn+ACeJNvKTUCiyADlGedw/v7j0HtQ
> +CcAn2CzlgMmizAOFn3CE++69CrlslbT
> =m671
> -----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 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/


------------------------------------------------------------------------------
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>