[Dirvish] How to fix sudo: no tty present and no askpass program specified
don at bowenvale.co.nz
Thu Jul 17 00:32:21 UTC 2014
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.
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]
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: bkuser at yourserver.fqdn
In sudoer on target machine
bkuser ALL = NOPASSWD: /usr/bin/rsync
bkuser ALL = NOPASSWD: /usr/local/bin/rsync-new
Note security issues in thread linked above.
31 Acheson Ave
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dirvish