I am trying to limit the memory of a single user that keeps crashing our OpenSuse Server.

What I have done is as desribed here, to modify the limit of the user's slice via

systemctl set-property user-$UID.slice MemoryHigh=20G

where $UID is the user id... e.g. 1000 for the first user created on the system. Now querying the status of the slice, I get:

● user-$UID.slice
   Loaded: loaded
  Drop-In: /etc/systemd/system.control/user-1008.slice.d
           └─50-MemoryHigh.conf, 50-MemoryLimit.conf
   Active: inactive (dead)

The status does also not change if the user is loggedin via ssh and runs some process. I am wondering if the limits are enforced?

So I have several questions:

  1. How do I check if the limits are enforced?
  2. I have turned off PAM Authentication in the the sshd file. Has that something to do with it? What do I have to keep in mind when setting PAMAuthentication to yes? Will I be locked out of ssh? I am a little hesitant, since locking myself out means driving to the server location... :D
  3. Has somebody had the same issue and might share his or her solution?
  4. Is there a way to set memory limits for a bunch of users that are within a certain user group? So instead of crafting a rule for each new user that blows up the system, can I simply create a user group for the slobs and then simply add the difficult users to this group?

Any advice is welcome :D

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.