KIAUH asks for a sudo password even if sudo does not require a password. #395
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Linux Distribution
Raspberry Pi OS (Legacy) Lite (Debian Bullseye)
What happened
KIAUH asks for a sudo password.
What did you expect to happen
KIAUH should just run sudo, because I have
pi ALL=(ALL) NOPASSWD:ALLin the sudoers file, and it does not require a password.How to reproduce
Put
pi ALL=(ALL) NOPASSWD:ALLin the sudoers file and then run KIAUH. It will ask for a sudo password despite not needing one.Additional information
This makes it impossible to use KIAUH unless you set a password for
pi, which I don't like to have to do because I prefer key authentication for its security.there is still a password on the account, no? i am in the same boat, NOPASSWD set, public/private key auth, and it worked fine afaik
But
sudodoes not require one andsudois what this script is using so there's no reason for it to ask for my password.I assume it's a misconfiguration of your sudoers file. I can't reproduce it. Make sure there are no group privileges overwriting the user priviliges.
It's... not? I can log in at any time and run any command using
sudo, absolutely no problem. But when I try to run KIAUH, it asks me for a password anyway, even thoughsudocertainly and absolutely does not require one. I had to run asudo passwdjust to set a password to use for KIAUH.Well, as i don't know the content of your sudoers file, i can just make assumptions.
For example, my user is part of the sudo group:


-> i'l' still get asked for the sudo password.
But:
-> i'll not be asked for the password.
That's where my assumption came from.
I added my user at the bottom of the file, so that seems fine. I'm no longer using the system that had this issue since I gave up on 3D printing. Can you share what sudo command KIAUH uses in order to ask for the password? Is there a way to just make it not do that?
What do you mean what sudo command? There is only one sudo command ->
sudo😅It's mainly used in cases where KIAUH does something in terms of checking system packages. Updating the package list, getting the age of the last update of that list. How should KIAUH prevent a user getting asked for a password it its a system-level thing if not configured otherwise?
https://github.com/dw-0/kiauh/blob/master/scripts/ui/install_menu.sh#L38
Probably the very virst occurence of
sudoif a user opens KIAUH for the first time.Found it:
7a9e752f9c/scripts/ui/install_menu.sh (L38)sudo -v: asks the user for a password, no exceptions. Forces sudo to ask for a password even if NOPASSWD is set.It's not my fault.
I absolutely do configure it otherwise, but again, KIAUH forces sudo to ask for a password, even if it's not necessary.
Use sudo something without
-vfor this. Maybesudo true?And
sudo truewon't ask you for password? It does for me.That's correct, it won't ask me for a password because the sudoers file tells it not to.
sudo -vforces it to ask for a password even if sudoers saysNOPASSWD:ALL.sudo trueonly asks for a password if it actually needs one.Okay, i can switch that command to use "true" instead.
thank you!
Thank you for making me aware of an alternative.
Looks like it needs adjusted in another spot.
Thank you for the hint! I pushed a commit with that change.