[ Thanks to Amy Newman for this link.
]
“When setting up or managing multi-user systems, you might want
to set some resource constraints for users on the system. Using the
pam_limits module, you can do that for many of the resources you
might want to constrain. (There is, of course, more than one way to
skin a cat–so to speak–but this is one of the easiest ways to go
about it.)“What you want to do is start by enabling the pam_limits.so
module for each service. For example, here’s how it’s set up on my
Ubuntu system for sshd:“session required pam_limits.so”