glenfant
glenfant

Reputation: 1318

Fabric 2: configuring sudo passwords for various hosts

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.

Upvotes: 5

Views: 358

Answers (1)

Devidas
Devidas

Reputation: 2517

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.

Upvotes: 0

Related Questions