fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] telling sudo() to error if prompted for a password


From: Jeff Forcier
Subject: Re: [Fab-user] telling sudo() to error if prompted for a password
Date: Thu, 23 Jul 2009 16:41:33 -0400

On Thu, Jul 23, 2009 at 4:02 PM, Timothee Besset<address@hidden> wrote:
> I am testing 50+ machines for a correctly configured sudo installation
> right now. Whenever one of those machines is bad, it prompts me and I
> have to kill fab and try again on the next host. It is going very
> slowly. If I was able to just output an error I'd just run a single
> batch and grep my list of systems I need to fix out of the log.

I'm guessing you're testing for whether the remote user is listed in
sudoers with a "NO-PASSWORD" type setting? Can't fathom what else it
might be where sudo works well enough to spit out a prompt but is
otherwise incorrectly configured :)

If that's accurate, I would imagine this is indeed a bit of an edge
case -- I'd feel kind of funny about putting in a config setting to
the effect of "if sudo appears to be working correctly, don't prompt
me, send up an abort/warn instead".

You could pretty easily modify your local copy of fabric/network.py,
line 305, so that the top of the "if initial or try_again:" block
calls warn() or abort(). That should, I think, do what you need.

Best,
Jeff




reply via email to

[Prev in Thread] Current Thread [Next in Thread]