---
name: "pam_shells"
section: "8"
platform: "linux"
package: "pam"
version: "1.7.3-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/pam_shells"
---

# pam\_shells(8)

PAM module to check for valid login shell

## NAME

pam\_shells - PAM module to check for valid login shell

## SYNOPSIS

**pam\_shells.so**

## DESCRIPTION

pam\_shells is a PAM module that only allows access to the system if the user's shell is listed in /etc/shells.

It also checks if needed files (e.g. /etc/shells) are plain files and not world writable.

## OPTIONS

This module does not recognise any options.

## MODULE TYPES PROVIDED

The **auth** and **account** module types are provided.

## RETURN VALUES

PAM\_AUTH\_ERR

Access to the system was denied.

PAM\_SUCCESS

The user's login shell was listed as valid shell in /etc/shells.

PAM\_USER\_UNKNOWN

The user does not exist or the user's login shell could not be determined.

PAM\_SERVICE\_ERR

The module was not able to get the name of the user.

## EXAMPLES

```
auth  required  pam_shells.so
```

## SEE ALSO

[**shells**(5)](/shells/5.md), [**pam.conf**(5)](/pam.conf/5.md), [**pam.d**(5)](/pam.d/5.md), [**pam**(8)](/pam/8.md)

## AUTHOR

pam\_shells was written by Erik Troan \<ewt@redhat.com\>.
