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…@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.