sudo sometimes fails for me

Patrick Smith yellowdog-general@lists.terrasoftsolutions.com
Sat Mar 27 12:20:02 2004


Clinton MacDonald wrote:
> [clint@YellowPup]$ sudo synaptic &
> [2] 2610
> [clint@YellowPup]$ Password:clint_password
> -bash: clint_password: command not found
> [clint@YellowPup]$
> 
> It would seem that there was a bug in sudo, such that it assigned a 
> process ID to synaptic *before* asking for my password, then revealed 
> the rest of the transaction in clear text.
> 
> Of course, the work-around is "don't do that." If I just type "sudo 
> synaptic" I get the console back fine. However, old habits die hard, and 
> sudo shouldn't reveal my password under *ANY* circumstances.

sudo didn't reveal your password.  You did.

The & says 'run "sudo synaptic"' in the background.  So now you have two 
processes running:  sudo, that wants your password, and your shell, that 
  wants a command (hence the shell prompt on the same line as Password). 
  When you typed your password, it was taken as a command by the shell, 
which then reported that it couldn't find such a command.

If you really want to do this, try instead

	sudo sh -c 'synaptic&'