FYI
The following is provided to the list for info only. Readers are
welcome to comment if they see something wrong or of interest.
Below are more details on how we managed to resolve our issue with tty
issues in a sudo set up.
Readers are welcome to make contact if they have further questions.
D
Further to: http://www.dirvish.org/pipermail/dirvish/2005-June/000387.html
RSYNC_ERR: sudo: no tty present and no askpass program specified
RSYNC_ERR: rsync: connection unexpectedly closed (0 bytes received so
far) [Receiver]
RSYNC_ERR: rsync error: error in rsync protocol data stream (code 12) at
io.c(605) [Receiver=3.0.9]
#!/bin/sh
rsync -a -e 'ssh -t' --rsync-path="sudo rsync" $*
# this prevents the tty and passkey ask issues.
From man rsync
-e, --rsh=COMMAND specify the remote shell to use
--rsync-path=PROGRAM specify the rsync to run on remote machine
You can put the override in the default.conf - this is useful
client: [email protected]
tree: /var/www
xdev: true
index: gzip
image-default: %Y%m%d-%H%M
rsync-client: "/usr/local/bin/rsync-new"
exclude:
In sudoer on target machine
bkuser ALL = NOPASSWD: /usr/bin/rsync
bkuser ALL = NOPASSWD: /usr/local/bin/rsync-new
Defaults!/usr/local/bin/rsync-new !requiretty
Defaults!/usr/bin/rsync !requiretty
Note security issues in thread linked above.
--
Don Gould
31 Acheson Ave
Mairehau
Christchurch, New Zealand
Ph: + 64 3 348 7235
Mobile: + 64 21 114 0699
Ph: +61 3 9111 1821 (Melb)
I'M COLLECTING COFFEE CUPS FOR PROJECT COFFEE CUP.
Deja vue (missing the French accent mark) - literally means already seen, that
sense of haven't we been here before.
_______________________________________________
Dirvish mailing list
[email protected]
http://www.dirvish.org/mailman/listinfo/dirvish