Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Linux has a PAM module that manipulates cgroups. How is it configured (what options does it support?)

share|improve this question
up vote 3 down vote accepted

The settings for the module are controlled by /etc/cgrules.conf just as for the rest of the cgroup facilities. When added to the PAM stack for a particular program, the program will inherit the cgroup as appropriate for its UID/GID.

If you add the pam_cgroup module to the login stack, the user's process will all automatically belong to the user's cgroup when they log in.

The details of this are actually documented in the README file for libcg. Here's a direct link to the README in the git repo.

share|improve this answer
for services other than login, like su, you can force the PAM module to fire by editing the services file in /etc/pam.d/_service_ – Rooster Jan 16 '14 at 0:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.