Installing and Configuring the Linux PAM
The Pluggable Authentication Module (PAM) allows you to integrate your Linux environment with IAM to perform end-user authentication with first and second factor authentication.
What is the Linux PAM?
The PAM is an authentication module for Linux that performs end-user authentication with IAM.
The PAM also allows Linux administrators, or end users, to query information about users
and groups stored in IAM using standard Linux
commands that utilize NSS such as id
, group
, and
getent
.
Why use the Linux PAM?
Use the PAM when you want to authenticate users in Linux using IAM.
An organization might have large numbers of Linux servers, making management of users, for example creating, modifying, or deleting users, a time intensive and costly activity. With the Linux PAM you can manage Linux users centrally in IAM, providing cost and time savings.
Linux administrators can utilize IAM to authenticate end users. End users can log in to a Linux server, for example with SSH, and authenticate with their IAM user credentials. In addition, the multi-factor authentication offerings of IAM can be utilized so end users are prompted to authenticate with a second factor such as a One Time Password code sent using Email, SMS, a Mobile Authenticator application, or authenticate using security questions. As well as authenticating with single or multiple factors, administrators, and end users can use NSS and standard Linux commands to query user and group information.
Certified Components for the Linux PAM
The following table lists the certified releases for IAM and your operating system (which is required for the Linux Pluggable Authentication Module (PAM) to run).
Every PAM download includes all certified components.
64-Bit | Operating System |
---|---|
Yes. (x86_64) |
Oracle Linux 6 Oracle Linux 7 Oracle Linux 8 |
Using the Console
Install and Configure the Linux PAM
Learn how to download, install, and configure the Linux Pluggable Authentication Module (PAM).
To download the Linux Pluggable Authentication Module (PAM), see Downloading SDKs and Applications.
To install the Linux Pluggable Authentication Module (PAM) on your Linux environment, you install the PAM rpm's along with some dependencies:
To register the IAM Linux Pluggable Authentication Module (PAM) as a client application in IAM, you create a confidential application with the POSIX Viewer role.
Configure a wallet on your Linux environment to store the client_id and client_secret of the confidential application with the POSIX Viewer role. This enables the Linux Pluggable Authentication Module (PAM) to communicate securely with the confidential application.
-
walletMgr add <wallet_location> client_id <client_id>
-
walletMgr add <wallet_location> client_secret <client_secret>
$ walletMgr add /etc/opc-wallet/ client_id b6d001f65da542c38ceb284ea8a05926
wallet initialized successfully.
key client_id is added successfully in wallet.
$ walletMgr add /etc/opc-wallet/ client_secret fea39433-5115-4050-b486-138cce381fb2
wallet initialized successfully.
key client_secret is added successfully in wallet.
Configuring the Linux PAM
Configure the Linux Pluggable Authentication Module (PAM) on your Linux environment.
The PAM is configured using either the SSSD or NSCD service on Linux.
The PAM can't be configured using both SSSD and NSCD simultaneously. Choose one configuration only. Choosing whether to use SSSD or NSCD is dependent on how your Linux environment is currently configured. Contact your Linux Administrator for details.
Configure the Linux Pluggable Authentication Module (PAM) on Linux using the SSSD service.
- The SSSD service must be installed. If it is not installed, install via
sudo yum install sssd
. - The service must be configured to start when the system reboots. You can perform
this configuration via
sudo chkconfig sssd on
. - The property
SELINUX
must be set aspermissive
ordisabled
in file/etc/selinux/config
. If it is not set, then setSELINUX=permissive
orSELINUX=disabled
. - Restart Linux to incorporate the above changes.
Configure the Linux Pluggable Authentication Module (PAM) on Linux using the NSCD service.
- The NSCD service should be installed. If it's not installed, install using
sudo yum install nscd
. - The service must be configured to start when the system reboots. You can perform
this configuration using
sudo chkconfig nscd on
. - The property
SELINUX
must be set aspermissive
ordisabled
in file /etc/selinux/config. If it's not set, then setSELINUX=permissive
orSELINUX=disabled
. - Restart Linux to incorporate the above changes.
Check that the following packages are installed on Oracle Linux:
rpm -q selinux-policy-targeted policycoreutils libselinux-utils libselinux-python libselinux
When you change the SELinux mode from Permissive or Disabled to Enforcing, then you must reboot.
Configure PAM-enabled Groups and Users
Learn how to create new groups and users with POSIX Viewer role attributes, or add POSIX Viewer role attributes to existing groups and users, to allow end users on Linux to authenticate with IAM using the Linux Pluggable Authentication Module (PAM).
Obtain an access token with Identity Domain Administrator or User Administrator privileges. This allows you to create groups and users with POSIX attributes, or add POSIX attributes to existing groups and users.
curl -k -X POST -u "client-id:client-secret" -d
"grant_type=client_credentials&scope=urn:opc:idm:__myscopes__"
"https://identity-cloud-service-instance-url/oauth2/v1/token"
where:
client-id
is the client ID of a confidential application with Identity Domain Administrator or User Administrator privilegesclient-secret
is the client secret of a confidential application with administrative privilegesidentity-cloud-service-instance-url
is your IAM Instance URL
The PAM confidential application client-id
and client-secret
are used by the PAM client library to create both groups or POSIX groups.
/ui/v1/groups
Create a group with POSIX attributes.
Create a user with POSIX attributes and add the user to the group previously created.
Add POSIX attributes to existing groups.
Add POSIX attributes to existing users.
In order to add POSIX attributes to an existing user, that user must first be part of a group, and that group must have POSIX attributes.
Verify that you can view users and groups and their POSIX attributes.
Test authentication on Linux using a user in IAM.
- Me
- POSIX Viewer
- Signin
Learn how to set up Multi-Factor Authentication (MFA) so Linux users can authenticate using multiple factors.