🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.os.linux.slackware
Article #14

Re: Moving to Slackware 15, having troubles with PAM

#14
From: Lew Pitcher
Date: Thu, 29 Oct 2026 16:04
121 lines
5605 bytes
Hi, Mike.

Thanks for your reply. I'll review my pam setup with an eye
to your comments.

On Thu, 29 Oct 2026 00:00:55 -0400, Mike Small wrote:

> Lew Pitcher <lew.pitcher@digitalfreehold.ca> writes:
> 
>> Hi gals and guys
>>
>> I'm having problems with Slackware 15's user authentication and authorization
>> process, as managed by pam(8), and need some advice.

[snip relevant problem description]

> I don't recall having to do much or understand PAM, but I hadn't

[snip relevant discussion, not necessary to this reply]

In my thrashing around with this problem, I made some changes to
/etc/pam.d/su and /etc/pam.d/elogind-user, that I've now backed out
(by "upgradepkg --reinstall", and ensuring the relevant .new files
have been properly taken care of).

As far as I know, I've got all the relevant packages installed, but
I will recheck this. I'm not seeing any evidence of error or misbehaviour
in the log files, but will keep watch. If necessary, I'll enable
debugging and watch the results for clues.

I have a local privilege escalation issue that seems to have come from
the upgrade. A logged in unprivileged user can gain root access without
providing any credentials. A user physically at the system console can
log in as root without providing any credentials. THIS bothers me greatly. 

To describe the specific problems I'm seeing, let me first describe
the behaviour of the 14.2 system I'm migrating from:

a) shadow passwords implemented, ssh installed and configured.

b) The only terminal device is the console. I have NO other physical
   terminals on the system.

c) ALL logins at the console (including root) ask for a password
   and prevent login if user is unknown or password is incorrect

d) sudoers does not enable wheel group, /etc/group wheel group unused,

e) /etc/ssh/sshd_config only contains
   LoginGraceTime 30s
   PermitRootLogin no
   MaxAuthTries 2
   MaxSessions 5
   PubkeyAuthentication yes
   AuthorizedKeysFile      .ssh/authorized_keys
   PasswordAuthentication no
   X11Forwarding yes
   UsePrivilegeSeparation sandbox
   Subsystem       sftp    /usr/libexec/sftp-server

f) ssh logins work to ssh rules (~/.ssh/authorized_keys, etc)
   the root user does not permit ssh login: /root/.ssh is empty

g) from an unprivileged session (either at console, or via ssh)
   a user must provide the root password to "su - root"

So, ssh logins require ssh keys, and physical logins and
privilege-escalation commands require passwords.

OTOH, with the upgraded system, behaviour is different.
a) shadow passwords implemented, ssh installed and configured.

b) The only terminal device is the console. I have NO other physical
   terminals on the system.

These two are the same as before, but...
c) root login at the console DOES NOT ask for a password, but immediatly
   grants a root session. It is /this/ behaviour that bothers me.

   OTOH, unprivileged logins at the console DO ask for a password. I
   have not exercised the "unknown user" or "incorrect password"
   scenarios yet.

To continue:
d) sudoers does not enable wheel group, /etc/group wheel group unused,

e) /etc/ssh/sshd_config only contains
  LoginGraceTime 30s
  PermitRootLogin no
  MaxAuthTries 2
  MaxSessions 5
  PubkeyAuthentication yes
  AuthorizedKeysFile      .ssh/authorized_keys
  PasswordAuthentication no
  X11Forwarding yes
  UsePrivilegeSeparation sandbox
  Subsystem       sftp    /usr/libexec/sftp-server

f) ssh logins work to ssh rules (~/.ssh/authorized_keys, etc)
   the root user does not permit ssh login: /root/.ssh is empty

HOWEVER...

g) from an unprivileged session (either at console, or via ssh)
   a user is not prompted for the root password on "su - root",
   but is immediately granted a root session. /This/ behaviour
   also bothers me.

I'm assuming that I've either missed some critical package or
misconfigured the authentication and authorization facilities
(both are possible). 

I will keep looking, as per your suggestions. In the mean time,
I'd appreciate any further assistance you or the denizens of
alt.os.linux.slackware can provide.

Many, many thanks.
-- 
Lew Pitcher
"In Skills We Trust"
Not LLM output - I'm just like this.
Technical Details
Message-ID: <11bvqpt$3ehks$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11btoef$2pfoe$1@dont-email.me> <jpk8q3hf954.fsf@panix5.panix.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Lew Pitcher <lew.pitcher@digitalfreehold.ca>
Newsgroups: alt.os.linux.slackware
Subject: Re: Moving to Slackware 15, having troubles with PAM
Date: Thu, 29 Oct 2026 16:04:14 -0000 (UTC)
Organization: The Pitcher Digital Freehold
Lines: 121
Message-ID: <11bvqpt$3ehks$1@dont-email.me>
References: <11btoef$2pfoe$1@dont-email.me>
	<jpk8q3hf954.fsf@panix5.panix.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 29 Oct 2026 16:04:14 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3622556"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19ciZCnQmlnUhnVgadhBBIQnWYiGrTQycg="; posting-host="2614641378bd6cb99d755b510688ef56"
User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508
 git://git.gnome.org/pan2)
Cancel-Lock: sha1:2qQ/VF24OvsBwOJqcxZcCMRSDJM= sha256:nrfjR0YpOSgzqsHI88InG0zxiGx8YtyrOBG0hWU0afg=
	sha1:k8PuxWQXzFmV5TZeeUlX7vr4xLA= sha256:LVz+2JFCIRMN4LaemVIeWui1mrJkbB0U/XzorEfUQ5s=