GNU bug report logs - #6323
Enhancement request: Add wronly to Coreutils

Previous Next

Package: coreutils;

Reported by: Daniel Trebbien <dtrebbien <at> gmail.com>

Date: Tue, 1 Jun 2010 12:07:02 UTC

Severity: wishlist

Full log


Message #14 received at 6323 <at> debbugs.gnu.org (full text, mbox):

From: Bob Proulx <bob <at> proulx.com>
To: Daniel Trebbien <dtrebbien <at> gmail.com>
Cc: 6323 <at> debbugs.gnu.org
Subject: Re: bug#6323: Enhancement request: Add wronly to Coreutils
Date: Wed, 2 Jun 2010 10:05:54 -0600
Daniel Trebbien wrote:
> `sudo` with the `-S` option causes it to write the password prompt (if
> it requires a password at that time) to standard error and read the
> password from standard in. The problem is: how do I know if `sudo`
> requires a password? I need to try to read the password prompt from
> standard error, but if the password is not required, then the parent
> process will wait for data on standard error while the child process
> (`wronly` by this time) waits for data on standard in.

There is always the sudo -k option.  If the user isn't configured with
NOPASSWD then sudo -k ignores the timestamp file and will always ask
for a password.  That would make it more consistent.

Newish sudo commands include a -A option along with a SUDO_ASKPASS
variable.  It will invoke a helper program to read the password.  I
would probably go that route myself.

Bob




This bug report was last modified 15 years and 78 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.