On 04/04/2014 08:14, Georgios Dimitrakakis wrote:
On 03/04/2014 15:51, Brian Candler wrote:
On 03/04/2014 15:42, Georgios Dimitrakakis wrote:
Hi Brian,
try disabling "requiretty" in visudo on all nodes.
There is no "requiretty" in the sudoers file, or indeed any file
under /etc.
The manpage says that "requiretty" is off by default, but I suppose
Ubuntu could have broken that. So just to be sure, I created
/etc/sudoers.d/norequiretty with:
Defaults !requiretty
on all nodes. It doesn't make any difference.
Actually, I missed something, as I found when trying to do a local sudo:
sudo: /etc/sudoers.d/norequiretty is mode 0644, but should be 0440
But fixing that doesn't prevent the original problem.
brian@ceph-admin:~/my-cluster$ ceph-deploy install node1 node2 node3
[ceph_deploy.cli][INFO ] Invoked (1.4.0): /usr/bin/ceph-deploy
install node1 node2 node3
[ceph_deploy.install][DEBUG ] Installing stable version emperor on
cluster ceph hosts node1 node2 node3
[ceph_deploy.install][DEBUG ] Detecting platform for host node1 ...
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: 3 incorrect password attempts
[node1][DEBUG ] connected to host: node1
Regards,
Brian.
This definitely has to do with the tty!
If you login with SSH there is no TTY present to ask for the sudo
password.
For instance, I 've found these links on the net
http://stackoverflow.com/questions/21659637/sudo-no-tty-present-and-no-askpass-program-specified-netbeans
http://askubuntu.com/questions/281742/sudo-no-tty-present-and-no-askpass-program-specified
both saying the same thing!
The workaround of adding "-t" to the ssh command line works:
brian@ceph-admin:~$ ssh node1 'ls'
xxx
yyy
brian@ceph-admin:~$ ssh node1 'sudo ls'
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: no tty present and no askpass program specified
Sorry, try again.
sudo: 3 incorrect password attempts
brian@ceph-admin:~$ ssh -t node1 'sudo ls'
[sudo] password for brian:
xxx yyy
Connection to node1 closed.
but ceph-deploy doesn't add that flag.
It does also work with:
ssh -o RequestTTY=yes node1 'sudo ls'
ssh -o RequestTTY=force node1 'sudo ls'
But strangely, not if I put this in ~/.ssh/config:
$ cat ~/.ssh/config
Host node1
RequestTTY force
Host *
RequestTTY force
In that case, ssh -v doesn't show a TTY being requested :-(
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com