Linux command
pam_group 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Enable group assignment in PAM config
auth required pam_group.so
Grant audio group to all users at all times
echo "* ; * ; * ; Al0000-2400 ; audio" >> /etc/security/group.conf
Grant video group to users on tty devices
echo "* ; tty* ; * ; Al0000-2400 ; video" >> /etc/security/group.conf
说明
pam_group is a PAM module that grants supplementary group memberships during the credential setting phase of authentication. It does not authenticate the user. Memberships are granted based on the service being accessed, the terminal, the user, and the time of login, as configured in /etc/security/group.conf. Groups are added in addition to those in /etc/group.
FAQ
What is the pam_group command used for?
pam_group is a PAM module that grants supplementary group memberships during the credential setting phase of authentication. It does not authenticate the user. Memberships are granted based on the service being accessed, the terminal, the user, and the time of login, as configured in /etc/security/group.conf. Groups are added in addition to those in /etc/group.
How do I run a basic pam_group example?
Run `auth required pam_group.so` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
Where can I find more pam_group examples?
This page includes 3 examples for pam_group, plus related commands for nearby Linux tasks.