5

I am looking for a way to configure passwords for "sudoing" in the various hosts targeted by a fabfile.py. I accept "clear" passwords" in a ~/.fabric.py|yaml|json but not in the fabfile.py.

Unless I didn't read correctly, the fabric documentation shows how to provide a common sudo password in a configuration file, but I have different users (managed through ~/.ssh/config) and different passwords for those hosts. And the system admin do not accept to let sudoing without password.

Thanks for any hint.

glenfant
  • 1,298
  • 8
  • 9
  • maybe this can help? https://stackoverflow.com/questions/38345184/fabric-difference-sudo-runsudo-cmd – hecvd Jul 19 '19 at 08:11

1 Answers1

0

current workaround would be. managing as per this. where you can provide ssh_password as a argument.

I think you are accepting and storing clear text password.

fabric_connection.sudo("ls -al /root", password=sudo_password)

manage your passwords differently to achieve this.

Devidas
  • 2,479
  • 9
  • 24
  • Thanks, I knew this one, but I need the glue to have these passwords passed in through a configuration file. This does not answer I expected, sorry. – glenfant Jul 15 '19 at 13:33