Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] SU or USER password not accepted at all (Read 3773 times) previous topic - next topic
0 Members and 2 Guests are viewing this topic.

[SOLVED] SU or USER password not accepted at all

It's my first time using an init system other than systemd. I was an arch user, and generally don't have problems setting up my environment till today. I used the s6-base iso to install Artix-s6 on my machine with LVM on LUKS. My root user and standard user have different passwords, and I'm 10000 % sure I'm entering them right, it has nothing to do with keymaps. I'm using KDE plasma (X11) as my Desktop environment and SDDM. My standard user is in the "wheel" group and I already uncommented the part in visudo where it says %wheel ALL ALL ALL.

The funny thing which I don't understand is that my password is only rejected when using my Desktop environment (which is kde plasma). I used Yakuake, XTerm and Konsole for testing, all the same result; rejecting my SU and USER password. I tried "sudo su", "su", and other kind of sudo commands which never helped. Then, when switching to other tty's via "CTRL + ALT + F1-F6" my sudo and user password gets accepted. Only then I'm able to perform tasks which need sudo privileges. When in my Desktop environment basically I can't do anything sudo related. KDESU doesn't work either.

Since I never had an issue like this before on various systemd setups, I don't know if this is a KDE bug or s6 init related problem (maybe it's just me).  Sadly I don't know which logs to provide at this point. Sorry if this is the wrong place to post this. I already did my research on how to fix these issues without any progress. I reinstalled the OS too.

Re: SU or USER password not accepted at all

Reply #1
How did you install Artix? By default, su at least should work. sudo requires additional setup, which is the same as on Arch or other systemd distros: https://wiki.archlinux.org/title/Sudo

You didn't give relevant information here. What is the detailed output of:
Code: [Select]
$ su
and
Code: [Select]
$ sudo su
in the terminal emulator?


Re: SU or USER password not accepted at all

Reply #3
@strajder

Output of "su":

Code: [Select]
[user@john ~]$ su
Password:
su: Authentication failure
[user@john ~]$

Output of "sudo su":

Code: [Select]
[user@john ~]$ sudo su
[sudo] password for user:
Sorry, try again.
[sudo] password for user:
Sorry, try again.
[sudo] password for user:
sudo: 3 incorrect password attempts
[user@john ~]$

I'm sure I enter these passwords right since I configured my keymaps/keyboard layouts already :/

Re: SU or USER password not accepted at all

Reply #4
Try running passwd and then re-enter old passwd as new one. In tty, of course.

Re: SU or USER password not accepted at all

Reply #5
@AlexanderAlex The first thing I did when noticing problems with sudo was changing the password via a virtual terminal. What a coincidence (or bad luck ?) that libxcrypt won't accept weak hashes anymore...

Quick-Update: I changed the password for the root and standard user using virtual terminals right now and it still doesn't work.

Re: SU or USER password not accepted at all

Reply #6
Usually I would also try to reboot and see if the problem persists. Another guess I might have is PAM. See if you have any .pacnew files in /etc/pam.d/

Re: SU or USER password not accepted at all

Reply #7
How did you install Artix? By default, su at least should work. sudo requires additional setup, which is the same as on Arch or other systemd distros: https://wiki.archlinux.org/title/Sudo

@strajder

Sorry, forgot to explain that, I partitioned the disks, encrypted the disk and used lvm on luks using serpent-xts-plain64 with a 512b key and whirlpool hash (don't know if that helps). I opened the encrypted partition, then did basestrap, installed base, base-devel and neccessary packages. Chroot, installed nvidia drivers, plasma, sddm, elogind and their s6 packages. Added those to s6-bundle for autostart (I'm no s6 pro like I said this is new to me). Added hostname and hosts file, did my locales config, added a new user using "useradd -mG wheel user", after that uncommented %wheel ALL ALL ALL in visudo. Rebooted and everything worked! Except my rejected passwords when in my Desktop environment. :'(

There should (at least for me) be nothing wrong with the way I install artix 😐

 

Re: SU or USER password not accepted at all

Reply #8
@AlexanderAlex On other forums I saw that reinstalling PAM (package name pambase) did the trick. I tried that myself, sadly it fixed nothing. Now I checked my /etc/pam.d/ folder but inside there is no kind of .pacnew file or any other hidden file. Rebooting is something I did many many times already  :'(

Re: SU or USER password not accepted at all

Reply #9
Could it be something to do with console keymap vs desktop keymap?

Re: SU or USER password not accepted at all

Reply #10
@####### I made sure of that, I use loadkeys before entering any command in the virtual console. My vconsole and Desktop environment keyboard layouts are the same...

Re: SU or USER password not accepted at all

Reply #11
there is no kind of .pacnew file or any other hidden file.
.pacnew is referring to a file which is written instead of overwriting a modified existing file upon package update. For example, if you modified the file /etc/pacman.conf and there is an update to a package containing that file, the updated version will be instead in /etc/pacman.conf.pacnew. It is not referring to a hidden file (.pacnew is not a complete file name, only the extension). See here: https://wiki.archlinux.org/title/Pacman/Pacnew_and_Pacsave

Other than that, this sounds like a very unusual issue. Let me try to see if I'm understanding it correctly:
  • You can login as root under tty (textual consoles which you can access by Ctrl+Alt+F2..Ctrl+Alt+F5) using su or sudo
  • You can't login as root under a terminal emulator under a DE (for example, Konsole or xterm)

What I'd try next to eliminate KDE and your current terminal emulator as the potential source of the problem is:
  • Set (if you can) your root and user password to something simple, like just root and avoid using any other keyboard than "us", and set LC_ALL=C globally
  • Try to use su and sudo in a different terminal emulator (st, lxterminal, gnome-terminal, Terminator or guake)
  • Try to use a different DE (GNOME) or no DE (startx + dwm) and do step 2 to see if su and sudo work under terminal emulators there

Re: SU or USER password not accepted at all

Reply #12
Other than that, this sounds like a very unusual issue. Let me try to see if I'm understanding it correctly:
  • You can login as root under tty (textual consoles which you can access by Ctrl+Alt+F2..Ctrl+Alt+F5) using su or sudo
  • You can't login as root under a terminal emulator under a DE (for example, Konsole or xterm)

@strajder Yes that's definitely my issue  :)

Now a really strange thing happened. I installed gnome-terminal while on KDE and tried su and sudo etc. there; again nothing fixed. Then I fully uninstalled KDE plasma with sddm and installed DWM, configured the xinitrc quickly. I changed the passwords to "root" like you said. Now when I try the st terminal on DWM only "su" accepts the password??? sudo again is not working. This is a very strange setup what I have here! I tried to change the user password multiple times now but nothing helps. I can't find a logical explanation to this issue I have from now on.

Re: SU or USER password not accepted at all

Reply #13
I found a fix maybe? Maybe a workaround for some. I removed the user using "userdel -r user" then adding a new one by entering "useradd -mG wheel user". Now when I set the password "root" for my user called "user" everything works fine??? Realllly strange but I can not complain since everything works now.

For me this issue is solved. Thanks for the fast replies and helping me coming up with this solution.  8)