Discussion:
Authentication failed after su-
(too old to reply)
Stella Ashburne
2022-02-28 19:00:01 UTC
Permalink
According to https://wiki.debian.org/WiFi/HowToUse,

"Use the WPA passphrase to calculate the correct WPA PSK hash for your SSID by altering the following example"

the command to type is

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

The output of the terminal is: Authentication failed

Any solution(s) please?

Best regards.

Stella
Andrew M.A. Cater
2022-02-28 19:20:02 UTC
Permalink
Post by Stella Ashburne
According to https://wiki.debian.org/WiFi/HowToUse,
"Use the WPA passphrase to calculate the correct WPA PSK hash for your SSID by altering the following example"
the command to type is
su -l -c "wpa_passphrase myssid my_very_secret_passphrase > /etc/wpa_supplicant/wpa_supplicant.conf"
The output of the terminal is: Authentication failed
Any solution(s) please?
Best regards.
Stella
If you use sudo: prefix the above command with sudo

It may be that you need

su - -l -c "rest of the line"

su alone doesn't always get you root equivalent: the default changed a while
ago now so su - is needed.

All the very best, as ever,

Andy Cater
Stella Ashburne
2022-02-28 20:20:01 UTC
Permalink
Dearie

Thanks for your offer of help; however.....
Sent: Tuesday, March 01, 2022 at 3:10 AM
Subject: Re: Authentication failed after su-
If you use sudo: prefix the above command with sudo
It may be that you need
su - -l -c "rest of the line"
su alone doesn't always get you root equivalent: the default changed a while
ago now so su - is needed.
Firstly, I tried the command:

sudo su - -l -c "rest of the line"

It didn't work

Next, I tried:

sudo su- -l -c "rest of the line"

It didn't work either

On the third try, I typed:

sudo -i

followed by "rest of the line" (I ignored -l -c because if I included them, the "rest of the line" wouldn't be executed. Besides I don't know what the arguments -l -c stand for.)

Alternatively, one could type:

sudo su


Best regards.

Stella
Dan Ritter
2022-02-28 21:30:07 UTC
Permalink
Post by Stella Ashburne
sudo su - -l -c "rest of the line"
It didn't work
Copy and paste the actual error; they contain real information
to help us figure out what is happening.

-dsr-
Stella Ashburne
2022-02-28 22:50:01 UTC
Permalink
Dearie
Sent: Tuesday, March 01, 2022 at 5:09 AM
Subject: Re: Authentication failed after su-
Post by Stella Ashburne
sudo su - -l -c "rest of the line"
It didn't work
Copy and paste the actual error; they contain real information
to help us figure out what is happening.
To avoid confusion, I shall use the original example provided by Debian Wiki (https://wiki.debian.org/WiFi/HowToUse) which is:

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

In a terminal, I typed:

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

The output is Authentication failure

Best regards.

Stella
Dan Ritter
2022-02-28 23:40:01 UTC
Permalink
Post by Stella Ashburne
Sent: Tuesday, March 01, 2022 at 5:09 AM
Subject: Re: Authentication failed after su-
Post by Stella Ashburne
sudo su - -l -c "rest of the line"
It didn't work
Copy and paste the actual error; they contain real information
to help us figure out what is happening.
su: Authentication failure
That means that you failed to give the root password.

-dsr-
Stella Ashburne
2022-03-01 05:20:01 UTC
Permalink
Dearie
Sent: Tuesday, March 01, 2022 at 7:13 AM
Subject: Re: Authentication failed after su-
Post by Stella Ashburne
su: Authentication failure
That means that you failed to give the root password.
I disabled the root password during the process of installing Debian 11.

What should I do to resolve the issue?

Best regards.

Stella
Sven Hartge
2022-03-01 09:30:01 UTC
Permalink
Post by Stella Ashburne
Post by Dan Ritter
Post by Stella Ashburne
su: Authentication failure
That means that you failed to give the root password.
I disabled the root password during the process of installing Debian 11.
What should I do to resolve the issue?
Use sudo.

wpa_passphrase JupiterRising 1234567890 | sudo tee /etc/wpa_supplicant/wpa_supplicant.conf

Grüße,

--
Sigmentation fault. Core dumped.
Stella Ashburne
2022-03-01 11:10:01 UTC
Permalink
Mein Schatzi
Sent: Tuesday, March 01, 2022 at 5:28 PM
Subject: Re: Authentication failed after su-
Use sudo.
wpa_passphrase JupiterRising 1234567890 | sudo tee /etc/wpa_supplicant/wpa_supplicant.conf
Thanks for your tip.

Could you surf to https://wiki.debian.org/WiFi/HowToUse, look under the sub-heading "WPA-PSK and WPA2-PSK", paragraph 2 with the statement "Use the WPA passphrase to calculate the correct WPA PSK hash for your SSID by altering the following example:"

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

The above command doesn't work in Debian 11. The output is:

su: Authentication failed.

In addition to yours, What are the valid commands? (I shall provide feedback to the people in charge of Debian Wiki's website.)

Best regards.

Stella
David Wright
2022-03-01 16:20:01 UTC
Permalink
Post by Stella Ashburne
Post by Sven Hartge
Use sudo.
wpa_passphrase JupiterRising 1234567890 | sudo tee /etc/wpa_supplicant/wpa_supplicant.conf
Thanks for your tip.
Could you surf to https://wiki.debian.org/WiFi/HowToUse, look under the sub-heading "WPA-PSK and WPA2-PSK", paragraph 2 with the statement "Use the WPA passphrase to calculate the correct WPA PSK hash for your SSID by altering the following example:"
$ su -l -c "wpa_passphrase myssid my_very_secret_passphrase > /etc/wpa_supplicant/wpa_supplicant.conf"
su: Authentication failed.
In addition to yours, What are the valid commands? (I shall provide feedback to the people in charge of Debian Wiki's website.)
Substantively, they're all valid, but only under the circumstances of
the person who wrote them to the wiki. The same is true on this list.

So here, for example:

$ su -l -c "foo … "

will be fine for anyone knowing their root password.

There's a case to be made that any wiki using the su construction should
be converted to:

$ sudo foo …

or, here specifically, because of the redirection:

$ foo … | sudo …

because that meshes in with Debian's current mechanism of root-password-less
installation. Then again, perhaps:

# foo …

would be preferable, because it makes no assumptions¹, leaving users to
choose the appropriate mechanism for obtaining root on /their/ system.

As for the "people in charge of Debian Wiki's website", that's us, folks.

BTW, in general, I would not advise cutting and pasting anything from
a wiki (or debian-user, or random web pages) without checking what it
actually does. That usually means looking at man pages /and/
interpreting what you find there.

Just to illustrate, take the tip above, which I would expect to work
for you, judging from the rest of your posts. Now I'll try it:

$ wpa_passphrase JupiterRising 1234567890 | sudo tee /etc/wpa_supplicant/wpa_supplicant.conf
Sorry, auser is not allowed to execute '/usr/bin/tee /etc/wpa_supplicant/wpa_supplicant.conf' as root on laptop.corp.
$

whereas:

$ su -l -c "wpa_passphrase JupiterRising 1234567890 > /etc/wpa_supplicant/wpa_supplicant.conf"
Password: ← I typed the root password here
$

Perfect, and:

$ cat /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="JupiterRising"
#psk="1234567890"
psk=562a4993e8a8847d0fcd690a728951c184a831913649a3fd5f54181d41e0ab1c
}
$

(which, fortunately, is a file this system neither requires nor uses).
You don't need to guess that I have set a root password.

¹ beyond knowing that a # prompt means that you are now typing as root.
Much of this thread, and its companion, seems to consist of footnote
on footnote. Were they to qualify each statement with the particular
circumstances they work under, wiki pages would begin to resemble
legal documents.

Cheers,
David.
Stella Ashburne
2022-03-02 07:50:01 UTC
Permalink
Dearie
Sent: Wednesday, March 02, 2022 at 12:16 AM
Subject: Re: Authentication failed after su-
Please allow me to snip off large chunks of your tips in my reply.
Substantively, they're all valid, but only under the circumstances of
the person who wrote them to the wiki. The same is true on this list.
.......
¹ beyond knowing that a # prompt means that you are now typing as root.
Much of this thread, and its companion, seems to consist of footnote
on footnote. Were they to qualify each statement with the particular
circumstances they work under, wiki pages would begin to resemble
legal documents.
Thank you, David, for taking the time to explain stuff to me. I really appreciate it.

Best regards.

Stella

Charles Curley
2022-03-01 16:20:01 UTC
Permalink
On Tue, 1 Mar 2022 10:28:32 +0100
Post by Sven Hartge
Post by Stella Ashburne
What should I do to resolve the issue?
Use sudo.
wpa_passphrase JupiterRising 1234567890 | sudo tee
/etc/wpa_supplicant/wpa_supplicant.conf
That will work. Another way to do it is to provide a password for root.
Something like:

sudo -i # become root

passwd # set the new password.

Some thoughts:

* There's more than one way to do it. This is an unofficial motto of
Perl, but it applies to much of computing.

* Because of the thought above, often you can't just blindly copy
command line sequences from a book or web page. You must examine them,
understand what they do, and adapt them to your situation.

* Life is a learning experience.
--
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/
Stella Ashburne
2022-03-01 06:10:01 UTC
Permalink
Dearie
Sent: Tuesday, March 01, 2022 at 5:47 AM
Subject: Re: Authentication failed after su-
Post by Stella Ashburne
sudo su - -l -c "rest of the line"
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:

***@hostname:~$ su -l -c "wpa_passphrase JupiterRising 1234567890 > /etc/wpa_supplicant/wpa_supplicant.conf"
Password:
su: Authentication failure
***@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
Loading...