sudo -n pour éviter le askpass qui ne marchera

This commit is contained in:
Daniel STAN 2013-08-01 13:44:42 +02:00
parent 23ff2d58ee
commit 8d1d29840f
3 changed files with 16 additions and 5 deletions

View file

@ -15,7 +15,7 @@ ssh_path = '/usr/bin/ssh'
server_path = '/usr/local/bin/%s-server' % (cmd_name,)
#: Commande à exécuter sur le serveur après y être entré en ssh
distant_cmd = "sudo %s" % (server_path,)
distant_cmd = ["sudo", '-n', server_path]
#: Liste des serveurs sur lesquels ont peut récupérer des mots de passe.
#:
@ -25,13 +25,13 @@ distant_cmd = "sudo %s" % (server_path,)
#: le script sur le serveur distant.
servers = {
'default': {
'server_cmd': [ssh_path, 'vert.adm.crans.org', distant_cmd],
'server_cmd': [ssh_path, 'vert.adm.crans.org'] + distant_cmd,
},
# Utile pour tester
'localhost': {
'server_cmd': [ssh_path, 'localhost', distant_cmd],
'server_cmd': [ssh_path, 'localhost'] + distant_cmd,
},
'ovh': {
'server_cmd': [ssh_path, 'ovh.crans.org', distant_cmd],
'server_cmd': [ssh_path, 'ovh.crans.org'] + distant_cmd,
}
}