You are not logged in.

#1 2022-09-13 08:50:12

jr_west
Member
Registered: 2022-09-13
Posts: 11

New install, can't get sudo to work.

I have a headless install. I followed the install instructions. I haven't installed anything outside of what the instructions ask for. network is working.

I installed sudo, and set it up to allow users in the sudo group to use it. added the user to the correct group. all good.

It won't take my password. I know I'm typing it correctly because passwd works ( don't change it, just attempt to change it)

I had this problem the last time I installed arch as well, but I can't remember what I did to fix it.

I've googled and tried about a zillion different things. turning on systemd-homed, then turning it of. installing pambase. no joy
sometimes it just asked me for my passed again, and sometimes get the error

sudo: pam_open_session: Permission denied
sudo: policy plugin failed session initialization

I reset faillock after trying something else.

Sometimes I get this error in the log
sudo[1120]:  pam_open_session: Permission denied ; TTY=pts/0 ; PWD=/home/jonross ; USER=root ; COMMAND=/usr/bin/ls

and sometimes I get this one:

sudo[1120]: PAM _pam_load_conf_file: unable to open config for nss-auth

no idea why it's flips back and forth.

this is the only distro I've ever used where I can't get sudo to work out of the box. I'm about to give up and go back to gentoo.

Offline

#2 2022-09-13 09:01:00

loqs
Member
Registered: 2014-03-06
Posts: 18,293

Re: New install, can't get sudo to work.

What is the contents of /etc/sudoers?  Also what groups is the user you are testing with in `groups`?
What changes if any have you made to the system's pam configuration and nsswitch.conf?

Offline

#3 2022-09-13 17:04:14

jr_west
Member
Registered: 2022-09-13
Posts: 11

Re: New install, can't get sudo to work.

The sudoers is stock except for the addition of:

%sudo ALL=(ALL:ALL) ALL

the user is in the correct group.

I have not done anything w/ pam or nsswtich.conf

Last edited by jr_west (2022-09-13 17:05:28)

Offline

#4 2022-09-13 17:24:21

loqs
Member
Registered: 2014-03-06
Posts: 18,293

Re: New install, can't get sudo to work.

https://bbs.archlinux.org/viewtopic.php?id=57855
Edit:

$ pacman -Qkk `pacman -Qqo /etc/pam.d`
# cat /etc/sudoers
$ groups
$ whoami
$ sudo ls /dev/null

Last edited by loqs (2022-09-13 17:28:55)

Offline

#5 2022-09-13 21:28:45

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: New install, can't get sudo to work.

jr_west wrote:

The sudoers is stock except for the addition of:

%sudo ALL=(ALL:ALL) ALL

Please post the full verbatim contents of /etc/sudoers.

Unlike most other config files the order of the lines is very important and having them in the wrong place can drastically change the behaviour.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB