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

Re: Authentication failed after su-



Dearie

> Sent: Tuesday, March 01, 2022 at 5:47 AM
> From: "Bob McGowan" <bob@bnlmcgowan.net>
> To: debian-user@lists.debian.org
> Subject: Re: Authentication failed after su-
>
> On 2/28/22 13:09, Dan Ritter wrote:
> > sudo su - -l -c "rest of the line"
> 
> Some comments on this, without knowing just how it failed:
> 
> 1.  There is no reason I can see to using both 'sudo' and 'su' 
> together.  By default, they both let you run a command as the root user.
> 
Thanks for the clarification.

> 2.  Using both '-' and '-l' with su is redundant, they do almost (per 
> the man page) the same thing.  The man page suggests '-l' is better due 
> to reduced side effects.
> 
I wonder what "side effects" they may be.

> 3.  The -c option provides a means to tell su to run a specific 
> command.  So the string 'rest of the line' generates an error stating 
> 'command not found' if run as is.  You need to supply this part of the 
> line so processing can be duplicated and evaluated.
> 
Thanks once again.

> If I insert an 'echo' before the word 'rest', there is no error.
> 
Noted.

> Hence, the actual error is needed, as well as the actual command being run.
> 
The actual command is actually lifted from Debian Wiki (https://wiki.debian.org/WiFi/HowToUse). It is:

su -l -c "wpa_passphrase myssid my_very_secret_passphrase > /etc/wpa_supplicant/wpa_supplicant.conf"

In a terminal, I typed:

username@hostname:~$ su -l -c "wpa_passphrase JupiterRising 1234567890 > /etc/wpa_supplicant/wpa_supplicant.conf"
Password: 
su: Authentication failure
username@hostname:~$

The error message is Authentication failure.

Please note that I have chosen not to create a root password during the process of installing Debian 11.

Best regards.

Stella


Reply to: