Hi,

Eric Snyder wrote on 14.04.2007 at 21:27:16 [Re: [BackupPC-users] Backing up 
localhost - permission question]:
> Carl Wilhelm Soderstrom wrote:
> > [...]
> > I also have this entry in /etc/sudoers:
> > backuppc ALL=NOPASSWD: /bin/tar 
> >
> > the suggestion to make that 
> > backuppc ALL=NOPASSWD: /bin/tar -c
> >
> > is a good one tho.
> Thanks. I have done everything and I get the folowing result:
> [..]
> Running: /usr/bin/env LC_ALL=C /usr/bin/sudo /usr/bin/tar -c -v -f - -C 
> /etc --totals .
> full backup started for directory /etc
> Xfer PIDs are now 2025,2024
> 
> We trust you have received the usual lecture from the local System
> Administrator. It usually boils down to these three things:
> [ skipped 3 lines ]
> Password:

that's sudo showing the 'first time lecture' and asking for a password,
meaning the line does not match one with the 'NOPASSWD' flag. If you
*exactly* followed Carl's post, then you'll have to replace '/bin/tar'
with '/usr/bin/tar' in /etc/sudoers (or change your $Conf{TarClientPath} to
'/bin/tar' instead of '/usr/bin/tar' if appropriate - one of those might be
a soft link to the other, which would probably let sudo be picky about which
you may execute and which you may not, meaning your line in /etc/sudoers and
your $Conf{TarClientPath} would have to match, even though it's the same
executable, really; if you only have tar in one of (/bin, /usr/bin), you'll
have to use that and adapt /etc/sudoers, obviously).

If in doubt, try it out by hand:

        # su backuppc
        % sudo /bin/tar -c -f /tmp/foo.tar name.of.a.small.file

That way you can more easily play around with the command and see what
happens.

Aside from that, '/usr/bin/env LC_ALL=C /usr/bin/sudo ...' may or may not do
what you want, because sudo is quite careful about which environment
variables it passes on and which it doesn't. You should really only need to
set LC_ALL if your system default language is not English, because BackupPC
expects messages from tar to be in English (though I'm not sure if an 'exotic'
character encoding might make it necessary to set LC_ALL even with English as
default language).

Regards,
Holger

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
BackupPC-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Reply via email to