You are not logged in.

#1 2012-06-29 21:12:45

Jasonvw
Member
From: Detroit, Michigan
Registered: 2011-12-23
Posts: 22

[SOLVED] sudo issue

I just did a fresh install of Arch onto an old computer to use as a gateway. After installing sudo I had an issue using it:

[user@derpy ~]$ sudo -s
Password: 
I feel much better now.
Password: 
I don't wish to know that.
Password: 
Pauses for audience applause, not a sausage
sudo: 3 incorrect password attempts

(gotta have insults enabled)

Anyway, I obviously was typing in the correct password that I'd used a second earlier to ssh into the box. If I used the NOPASSWD option it worked fine.

In the /var/log/auth.log:

Jun 29 16:44:08 derpy sudo: PAM no modules loaded for `sudo' service
Jun 29 16:44:10 derpy sudo: pam_unix(sudo:auth): conversation failed
Jun 29 16:44:10 derpy sudo: pam_unix(sudo:auth): auth could not identify password for [user]

Now, pam.d had sudo and i checked it against my laptop's and it was exactly the same. PAM and sudo are latest from the repos.

What I did was replace the /etc/pam.d/sudo with the /etc/pam.d/su and this 'fixed' the problem. Is this an OK solution? Will I be creating a security vulnerability doing this or is there  a better solution?

For reference:

cat /etc/pam.d/sudo 
#%PAM-1.0
auth		required	pam_unix.so
auth		required	pam_nologin.so
cat /etc/pam.d/su   
#%PAM-1.0
auth		sufficient	pam_rootok.so
# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth		sufficient	pam_wheel.so trust use_uid
# Uncomment the following line to require a user to be in the "wheel" group.
#auth		required	pam_wheel.so use_uid
auth		required	pam_unix.so
account		required	pam_unix.so
session		required	pam_unix.so

Last edited by Jasonvw (2012-06-30 18:05:20)


RAID !=backup

Offline

#2 2012-06-29 22:15:22

Terminator
Member
From: Belgium
Registered: 2012-05-07
Posts: 265

Re: [SOLVED] sudo issue

Are you sure you where trying the right password? If you are in the wheel group, sudo wants your password. If you are not, then sudo wants the root password.

Offline

#3 2012-06-29 22:20:36

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,896
Website

Re: [SOLVED] sudo issue

If you aren't in sudoers, I thought it gave you a somewhat threatening "This incident WILL be reported!" message.

But yeah, check your sudoers file. The rootpw, targetpw and runaspw "Defaults" options change which password is asked for too, so check you haven't enabled those (unless you want them enabled).


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2012-06-29 22:31:16

Terminator
Member
From: Belgium
Registered: 2012-05-07
Posts: 265

Re: [SOLVED] sudo issue

Arch does not use the sudo group by default (or at least, not for sudo tongue).

Offline

#5 2012-06-29 22:37:17

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Offline

#6 2012-06-30 18:05:04

Jasonvw
Member
From: Detroit, Michigan
Registered: 2011-12-23
Posts: 22

Re: [SOLVED] sudo issue

Darn, I was searching everywhere and couldn't find anything for some reason. I did reinstall pam itself but I guess I needed to reinstall pambase as per
https://bbs.archlinux.org/viewtopic.php?id=143487

Thanks everyone.


RAID !=backup

Offline

Board footer

Powered by FluxBB