Re: [BackupPC-users] sudoers
2009-01-22 19:34:00
-----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:
>>> 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 *
>
> 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.
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/
|
|
|