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:
- How do I check if the limits are enforced?
- 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
- Has somebody had the same issue and might share his or her solution?
- 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 I also posted the question here as I am not sure which community is the more fitting.