Re: Authentication failed after su-
- To: debian-user@lists.debian.org
- Subject: Re: Authentication failed after su-
- From: Stella Ashburne <rewefie@gmx.com>
- Date: Tue, 1 Mar 2022 07:01:59 +0100
- Message-id: <[🔎] trinity-241ee4f5-9e4d-4aba-9df5-a3bf21934d69-1646114519522@3c-app-mailcom-bs05>
- In-reply-to: <ec5f9cb7-482f-9865-3dc9-1e5a28f8657e@bnlmcgowan.net>
- References: <trinity-f87321b8-7080-4253-bb11-d5a0252aa11e-1646074479254@3c-app-mailcom-bs04> <Yh0eOIPc3xqF40qn@einval.com> <trinity-98e1028b-a561-43c4-b72a-16af0efe1ccb-1646079305837@3c-app-mailcom-bs08> <20220228210903.46aiz55thnu6ptze@randomstring.org> <ec5f9cb7-482f-9865-3dc9-1e5a28f8657e@bnlmcgowan.net>
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: