← 返回命令列表

Linux command

pam_shells 命令

文件

复制后可按需替换文件名、目录或参数。

常用示例

Require valid shell for authentication

auth required pam_shells.so

Require valid shell for account access

account required pam_shells.so

说明

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 that /etc/shells is a plain file and not world-writable. The module provides both auth and account module types. It returns PAM_AUTH_ERR if the shell is not listed, PAM_SUCCESS if the shell is valid, and PAM_SERVICE_ERR if the username cannot be determined.

FAQ

What is the pam_shells command used for?

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 that /etc/shells is a plain file and not world-writable. The module provides both auth and account module types. It returns PAM_AUTH_ERR if the shell is not listed, PAM_SUCCESS if the shell is valid, and PAM_SERVICE_ERR if the username cannot be determined.

How do I run a basic pam_shells example?

Run `auth required pam_shells.so` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

Where can I find more pam_shells examples?

This page includes 2 examples for pam_shells, plus related commands for nearby Linux tasks.