Bug 132135 - Request for administrator-defined list separator parameter for pam_access.so
Request for administrator-defined list separator parameter for pam_access.so
Status: CLOSED UPSTREAM
Product: Fedora
Classification: Fedora
Component: pam (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Mraz
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-09-08 22:15 EDT by Richard Shaffer
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-05-27 06:34:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Patch to enable requested feature (878 bytes, patch)
2004-09-08 22:18 EDT, Richard Shaffer
no flags Details | Diff

  None (edit)
Description Richard Shaffer 2004-09-08 22:15:49 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1)
Gecko/20031114

Description of problem:
I am using Samba's winbindd and associated nsswitch modules to
authenticate users against a Windows 2000 domain.  I would like to
restrict access to certain services (like an SSH or console login)
using the pam_access module.  The default configuration file for this
module is /etc/security/access.conf, and it allows me to specify a
list of groups or users who should or should not be given access.

Unfortunately, pam_access interprets spaces in a list of groups or
usernames as a separator, and Windows domains tend to have a lot of
group names with spaces.  The default built-in group "Domain Users" is
a prime example.

The module already supports a parameter that allows defining a
different separator between field names.  (The default is a ':', as in
+-:usersgroups:hosts.)  It would be nice if the administrator could
also specify a different separator to use between each group/user and
each hostname.  The default of ' \t,' is hard-coded.  If this were the
case, then this line in my access.conf would do what I wanted:

+:Domain Admins,root:ALL
-:ALL:ALL

(Currently, the above would look for users who are in group "Domain"
or "Admins" but not "Domain Admins.")

Version-Release number of selected component (if applicable):
pam-0.77-15

How reproducible:
Always

Steps to Reproduce:
1.  Configure Winbind to retrieve users and groups from an existing
Windows domain.
2.  Configure the system (nsswitch and PAM) to use the winbind modules
for authentication and name resolution.
3.  Add the line "account pam_access.so" to your PAM service
configuration file (let's use /etc/pam.d/sshd for this case; you will
also have to specify UsePAM=yes in /etc/ssh/sshd_config).
4.  Configure /etc/security/access.conf to disallow the group name
with spaces in it:
+:Domain Admins,root:ALL
-:ALL:ALL
5.  Attempt a login with the service and note that PAM rejects the login.
Comment 1 Richard Shaffer 2004-09-08 22:18:48 EDT
Created attachment 103621 [details]
Patch to enable requested feature

Adds a new parameter, listsep, to the module.

Example (/etc/pam.d/sshd or other):

account pam_access listsep=,

Example (/etc/security/access.conf):

+:Domain Admins,root:ALL
-:ALL:ALL
Comment 2 Tomas Mraz 2005-05-27 06:34:39 EDT
The patch was accepted upstream so it will be pulled in the next upgrade of pam
package from upstream to Fedora Core development.

Note You need to log in before you can comment on or make changes to this bug.