ArchTitus icon indicating copy to clipboard operation
ArchTitus copied to clipboard

Wrong wheel line uncommented in sudoers

Open wilsonephillips opened this issue 2 years ago • 7 comments

wilsonephillips avatar Feb 28 '22 22:02 wilsonephillips

Hey Chris, I just ran this installer. I do see an issue that need to be fixed.

In the sudoers file, the wrong line for wheel is commented out. It is allowing wheel without a password.

Thanks!

wilsonephillips avatar Feb 28 '22 22:02 wilsonephillips

Not knowing any better, I commented out the one for no password and uncommented the one that asks for a password. The next time I tried to sudo, it did ask for a password, but would not accept my password. Since root seems to be disabled, I am locked out and will have to backdoor in to reset it.

wilsonephillips avatar Feb 28 '22 22:02 wilsonephillips

i also noticed this issue. I just put my own username underneath root as opposed to being part of the wheel group

yehonatan2020 avatar Mar 01 '22 00:03 yehonatan2020

I re-installed and set a password for root before doing the same thing you did.

I see in the script where it is supposed to swap those commented lines, but it is not doing so. It is allowing users to sudo with no password, which could be dangerous.

wilsonephillips avatar Mar 01 '22 01:03 wilsonephillips

The logic is in there to properly set the sudoers file... but I'm assuming if you look at your 3-post-setup.log you will see a syntax error before which will cause it to miss that step. Gonna see if i can get it resolved quickly.

khaneliman avatar Mar 01 '22 04:03 khaneliman

Its supposed to be this way round no?

Remove no password sudo rights

sed -i 's/^#%wheel ALL=(ALL:ALL) NOPASSWD: ALL/# %wheel ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers

Add sudo rights

sed -i 's/^ %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/' /etc/sudoers

yehonatan2020 avatar Mar 01 '22 11:03 yehonatan2020

No, it's s/find/replace/. Yours wouldn't change anything for the No password issue since you find the No password line commented out and replace it commented out (but it's not commented at that point it's enabled for installation purposes).

khaneliman avatar Mar 01 '22 11:03 khaneliman