I just figured this out myself. You have to runs ssh with flags "-t -t"
(or just "-tt"). That flag says to allocate a tty, but you need 2 to
force a tty when ssh is not called from a tty.
BUT, I also see that you are using "ssh -l root". The point of using
sudo is that you don't need remote-root access. The default
configuration needs to be better designed to get this right, with proper
security considerations.
Another problem I realized is that rsync cannot preserve user/group
values unless the local rsync is run as root.
I am going to try to work on this. Hasn't someone else on this list
worked on this??
Mariano Sokal wrote:
> Hello again, I tried to change what you said... (sudo -i) and now I get a
> different error:
>
> "Fatal error (bad version): stdin: is not a tty"
>
> This is the configuration file:
>
> #
> ## Backup For Host: host1
> ##
> $Conf{XferMethod} = 'rsync';
> $Conf{RsyncClientPath} = '/usr/bin/rsync'; $Conf{RsyncClientCmd} = '$sshPath
> -l root xxx.xxx.xxx.xxx nice -n 19 sudo -i
> $rsyncPath $argList+'; $Conf{RsyncClientRestoreCmd} = '$sshPath -q -x -l root
> xxx.xxx.xxx.xxx nice -n 19 sudo
> $rsyncPath $argList+'; $Conf{RsyncShareName} = ['/etc', '/var/www'];
> $Conf{BackupFilesExclude} = ['swapfile','access_log', 'error_log'];
> $Conf{PingMaxMsec} = 300;
> #
>
> What would be wrong?
>
> Thanks and regards,
> Mariano
>
> -----Original Message-----
> From: Joe Krahn [mailto:[EMAIL PROTECTED]
> Sent: viernes, 01 de febrero de 2008 07:54 p.m.
> To: Mariano Sokal
> Subject: Re: [BackupPC-users] (no subject)
>
> Mariano Sokal wrote:
>> Hello from Buenos Aires.
>>
>>
>>
>> I have just installed backuppc, and I was doing some tests with
>> "./BackupPC_dump -v -f host1".
>>
>>
>>
>> And I´m getting the following error:
>>
>>
>>
>> Running: /usr/bin/ssh -l root xx.xx.xx.xx nice -n 19 sudo i
>> /usr/bin/rsync --server --sender --numeric-ids --perms --owner --group
>> --devices --links --times --block-size=2048 --recursive -D
>> --exclude=swapfile --exclude=access_log --exclude=error_log
>> --ignore-times . /etc/
>>
>>
>>
>>
>>
>> Got remote protocol 1868854643
>>
>> *Fatal error (bad version): sudo:*
>>
>> Can't write 43 bytes to socket
>>
>>
>>
>> Any ideas?
>>
>>
>>
>> Best regards,
>>
>> Mariano Sokal
>>
>>
>
> Is that "sudo i" supposed to be "sudo -i"?
>
> Joe Krahn
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
BackupPC-users mailing list
[email protected]
List: https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki: http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/