pam_authz.5 (2010 09)
p
pam_authz(5) pam_authz(5)
NAME
pam_authz - PAM module that provides user authorization
SYNOPSIS
/usr/lib/security/$ISA/libpam_authz.so.1
DESCRIPTION
The pam_authz service module for PAM,
/usr/lib/security/$ISA/libpam_authz.so.1
, pro-
vides functionality which allows the administrator to control who can login to the system based on
net-
group information found in the /etc/passwd file or the access rules that are defined in an
access
policy file.
By default,
pam_authz has been created to provide access control similar to the
netgroup filtering
feature that is performed by NIS.
pam_authz is intended to be used when NIS is not used, such as
when the pam_ldap or pam_kerberos authentication modules are used. Because
pam_authz
does
not provide authentication, it does not verify if a user account exists.
pam_authz also broadens its ability to define host and service access management policy.
pam_authz
supports a local access policy file, which allows you to define access rules based on a variety of
information. allow or deny access rules can be defined base on LDAP X.500 style groups, regular
POSIX groups, netgroups, ldap filters and individual users. To activate this feature, create an access
policy file.
pam_authz provides an interface for all four PAM components: authentication, account management,
session management and password management. However, only the account management components
need to be configured. The PAM components for session management and password management are
NULL functions. These components always return [PAM_SUCCESS].
The
libpam_authz.so.1
library is a shared object that can be dynamically loaded to provide the
necessary functionality upon demand. Its path is specified in the PAM configuration file.
Access Policy File
The
access policy file referred to throughout this document is a configuration file created by the
administrator to define complex policies that control access based on a variety of information. This file is
named pam_authz.policy
and is located in /etc/opt/ldapux by default. Any service that loads
the
libpam_authz.so.1
library will also load this file if it exists, unless an access policy file
has been configured in another location and has been specified using the
policy option in pam.conf.
Read on for more details on the
access policy file and see the sample
/etc/opt/ldapux/pam_authz.policy.template
file delivered with this product.
Authentication and Account Managment Modules
The
pam_authz authentication component does not provide authentication. Instead, it provides author-
ization via pam_sm_acct_mgmt()
. pam_authz is intended to be used as a supplementary module
along with other authentication modules, where another module is used to verify user identities, while
pam_authz is used to verify user access rights. pam_authz is intended to be used when the list of
users that are allowed to gain access to a system is a subset of the users that are stored in a large reposi-
tory (such as an LDAP directory server, or other database.)
Because
pam_authz provides authorization only, not authentication, it is highly recommended that
pam_authz is set to required in the configuration file (see pam.conf (4)). Typically pam_authz is
configured as the first module under the account management section of the /etc/pam.conf file.
However, for PAM applications that neglect to call the PAM account management procedure,
pam_authz may also be configured as an authentication module. When pam_authz is configured as an
authentication module, at least one other PAM module must be set to required to authenticate a user.
Without an
access policy file, pam_sm_acct_mgmt() use netgroups (see netgroup (4)) and
the /etc/passwd file to determine user access rights, using a similar syntax as was defined by NIS.
However, pam_authz does not support the password entry filtering syntax as defined by NIS, other than
to determine if a netgroup member should be granted (or denied) access based on if the password field
is blocked or not.
pam_authz scans the /etc/passwd file for the matching NIS style entry and returns grant or deny
access based on the first rule that matches the account in question. For example, pam_authz will grant
or deny access when the following entries are defined in the /etc/passwd file:
HP-UX 11i v3: June 2010 Web Release − 1 − Hewlett-Packard Company 1