Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #245794

Re: Authentication failed after su-

From David Wright <deblis@lionunicorn.co.uk>
Newsgroups linux.debian.user
Subject Re: Authentication failed after su-
Date 2022-03-01 17:20 +0100
Message-ID <DWdod-5aLz-3@gated-at.bofh.it> (permalink)
References (4 earlier) <DVX05-50Fl-1@gated-at.bofh.it> <DVXMt-51bb-7@gated-at.bofh.it> <DW35v-54u6-1@gated-at.bofh.it> <DW6Zr-56SO-7@gated-at.bofh.it> <DW8yd-57U6-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue 01 Mar 2022 at 11:59:47 (+0100), Stella Ashburne wrote:
> > From: "Sven Hartge" <sven@svenhartge.de>
> >
> > 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.)

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.

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Authentication failed after su- Stella Ashburne <rewefie@gmx.com> - 2022-02-28 20:00 +0100
  Re: Authentication failed after su- "Andrew M.A. Cater" <amacater@einval.com> - 2022-02-28 20:20 +0100
    Re: Authentication failed after su- Stella Ashburne <rewefie@gmx.com> - 2022-02-28 21:20 +0100
      Re: Authentication failed after su- Dan Ritter <dsr@randomstring.org> - 2022-02-28 22:30 +0100
        Re: Authentication failed after su- Stella Ashburne <rewefie@gmx.com> - 2022-02-28 23:50 +0100
          Re: Authentication failed after su- Dan Ritter <dsr@randomstring.org> - 2022-03-01 00:40 +0100
            Re: Authentication failed after su- Stella Ashburne <rewefie@gmx.com> - 2022-03-01 06:20 +0100
              Re: Authentication failed after su- Sven Hartge <sven@svenhartge.de> - 2022-03-01 10:30 +0100
                Re: Authentication failed after su- Stella Ashburne <rewefie@gmx.com> - 2022-03-01 12:10 +0100
                Re: Authentication failed after su- David Wright <deblis@lionunicorn.co.uk> - 2022-03-01 17:20 +0100
                Re: Authentication failed after su- Stella Ashburne <rewefie@gmx.com> - 2022-03-02 08:50 +0100
                Re: Authentication failed after su- Charles Curley <charlescurley@charlescurley.com> - 2022-03-01 17:20 +0100
        Re: Authentication failed after su- Stella Ashburne <rewefie@gmx.com> - 2022-03-01 07:10 +0100

csiph-web