[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Fab-user] sudo fails every now and again
From: |
Jeff Forcier |
Subject: |
Re: [Fab-user] sudo fails every now and again |
Date: |
Fri, 2 Dec 2011 10:36:15 -0800 |
On Fri, Dec 2, 2011 at 9:27 AM, Hajducko, Steven
<address@hidden> wrote:
>>First time it prompts me for a password - why? As far as I understand
>> Fabric should be able to handle this?
Steven is right that Fabric can't make your sudo setup not require a
password initially, but I wonder if something got missed in
translation in all of this (I didn't see mention of it in the earlier
conversation): you can set your sudo password as "env.password" in
your fabfile.
Fabric should then try that password for any initial sudo prompts, and
only interactively prompt if that fails.
Another alternative is actually to remove the sudo password entirely
and give the user running this script (and only that user!) "ALL=(ALL)
NOPASSWD: ALL" access. Combined with key-only SSH authentication and
proper key management, it grants that user script-friendly admin
access without having the user's login password in your code.
There are pluses and minuses to both approaches but either one should
work for the most part.
Hope that helps,
Jeff
--
Jeff Forcier
Unix sysadmin; Python/Ruby engineer
http://bitprophet.org
- [Fab-user] sudo fails every now and again, address@hidden, 2011/12/01
- Re: [Fab-user] sudo fails every now and again, Ramon van Alteren, 2011/12/01
- Re: [Fab-user] sudo fails every now and again, address@hidden, 2011/12/01
- Re: [Fab-user] sudo fails every now and again, Paul Hoffman, 2011/12/01
- Re: [Fab-user] sudo fails every now and again, address@hidden, 2011/12/02
- Re: [Fab-user] sudo fails every now and again, address@hidden, 2011/12/02
- Re: [Fab-user] sudo fails every now and again, Hajducko, Steven, 2011/12/02
- Re: [Fab-user] sudo fails every now and again,
Jeff Forcier <=
- Re: [Fab-user] sudo fails every now and again, Jordi Funollet, 2011/12/04
- Re: [Fab-user] sudo fails every now and again, address@hidden, 2011/12/05