Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.os.linux.slackware > #35855

Re: Moving to Slackware 15, having troubles with PAM

From Mike Small <smallm@panix.com>
Newsgroups alt.os.linux.slackware
Subject Re: Moving to Slackware 15, having troubles with PAM
Date 2026-10-29 00:00 -0400
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <jpk8q3hf954.fsf@panix5.panix.com> (permalink)
References <11btoef$2pfoe$1@dont-email.me>

Show all headers | View raw


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.
>
> I've got a machine that's long been running 64bit Slackware 14.2. With this latest
> PHP trouble (CVE-2026-109618 and CVE-2026-109619, aka "PHP2Shell"), I finally
> decided to upgrade the system to 64bit Slackware 15. While I've got the upgrade
> mostly settled in, I've run into a bit of an issue with PAM.
>
> With Slackware 14.2, I understood how logins worked, and had made sure that
> a) nobody could sudo(8) into root access, and
> b) nobody could indiscriminately su(1) into root (you needed to know the root
>    password to successfully su(1) to root)
>
> And then, I upgraded to Slackware 15. With pam(8).
>
> Now, with no substantive changes to /etc/passwd, /etc/group, /etc/shadow, or
> /etc/login.defs, any logged in user can successfully "su - root" without answering
> a password prompt or other authorization.
>
> So, I've done something wrong. Or left something out.
>
> As most of you have been running Slackware 15 for as long as it has been out,
> and a few of you came from other environments where pam(8) is a given, I'm
> hoping for some advice as to how to diagnose and fix this problem. My goal
> is to regain the /simple/ authentication and authorization exhibited in
> my old Slackware 14.2 system. Simple authorization by password would be
> sufficient for now; it's better than the open authorization I've currently
> got.

I don't recall having to do much or understand PAM, but I hadn't
customized the shadow system much if at all.

First I'm noticing this comment at the end of login.defs(5):

     Much  of  the  functionality that used to be provided by the shadow password
     suite is now handled by PAM. Thus, /etc/login.defs  is  no  longer  used  by
     passwd(1),  or  less used by login(1), and su(1). Please refer to the corre‐
     sponding PAM configuration files instead.

So I'm thinking of two possibilities for your case:

1. something in your login.defs is confusing su+PAM. The above says "less
used" not "no longer used".

2. your past configuration has nothing to do with it, but PAM's
configuration is somehow messed up or you're missing module files.

I think #2 more likely, myself. In my /etc/pam.d/su I have...

------------------------------------------------------------------------
#%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            include         system-auth
account         include         system-auth
password        include         system-auth
session         include         system-auth
session         optional        pam_xauth.so
------------------------------------------------------------------------

The included /etc/pam.d/system-auth is longer, so I'm not pasting it in.
You can look at your installed copy vs what's in the Slackware package.
Here are the password related entries:

------------------------------------------------------------------------
password    requisite     pam_pwquality.so minlen=6 retry=3
password    sufficient    pam_unix.so nullok sha512 shadow minlen=6 try_first_pass use_authtok

# ATTENTION: always keep this line for pam_deny.so:
password    required      pam_deny.so
------------------------------------------------------------------------

Each of these modules have man pages. pam_deny(8) has this paragraph:

     This module can be used to deny access. It always indicates a failure to the
     application  through  the  PAM framework. It might be suitable for using for
     default (the OTHER) entries.

I could imagine your behaviour coming from a 'sufficient' module line and
no pam_deny.so line, but I don't know how you'd end up with that. The
meanings of requisite, sufficient, and required are defined in
pam.conf(5).

Or if it's not the password entries, maybe examine the auth
entries. Between pam.conf(5) and each module (3rd field, e.g. pam_deny
or pam_unix) having a man page, there's lots to read that might point
you right.

Finally, you can get some pretty extensive debug output about what
modules are loaded if you do the following before running su -:

1. touch /etc/suid-debug   (don't forget to remove this later)
2. setenv LD_DEBUG libs  or  export LD_DEBUG=libs

Regards,
Mike Sm.

Back to alt.os.linux.slackware | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Moving to Slackware 15, having troubles with PAM Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-10-28 21:11 +0000
  Re: Moving to Slackware 15, having troubles with PAM Mike Small <smallm@panix.com> - 2026-10-29 00:00 -0400
    Re: Moving to Slackware 15, having troubles with PAM Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-10-29 16:04 +0000
      Re: Moving to Slackware 15, having troubles with PAM Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-10-29 16:26 +0000
        Re: Moving to Slackware 15, having troubles with PAM Mike Small <smallm@panix.com> - 2026-10-29 13:16 -0400
          Re: Moving to Slackware 15, having troubles with PAM Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-10-29 18:10 +0000
        Re: Moving to Slackware 15, having troubles with PAM Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2026-11-02 06:22 +0000
          Re: Moving to Slackware 15, having troubles with PAM Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-11-02 14:16 +0000
            Re: Moving to Slackware 15, having troubles with PAM Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2026-11-03 06:53 +0000
            Re: Moving to Slackware 15, having troubles with PAM kaukasoina3dore73js4@sci.fi (Petri Kaukasoina) - 2026-11-03 08:21 +0000
              Re: Moving to Slackware 15, having troubles with PAM Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-11-03 14:45 +0000
                Re: Moving to Slackware 15, having troubles with PAM Mike Small <smallm@panix.com> - 2026-11-05 23:25 -0500
                Re: Moving to Slackware 15, having troubles with PAM Lew Pitcher <lew.pitcher@digitalfreehold.ca> - 2026-11-06 12:46 +0000
  Re: Moving to Slackware 15, having troubles with PAM Henrik Carlqvist <Henrik.Carlqvist@deadspam.com> - 2026-11-02 06:14 +0000

csiph-web