3

I may be taking the wrong approach here, but the new centos 7 implementation of cgroups lets you put limits on user's access to system resources by attaching said limits to their slices.

Ie.

systemctl set-property user-1005.slice CPUShares=100

However, that slice won't exist until the user has initially logged in. Since I'll be creating the user, I would kind of like to just trigger that initial log in at creation time, and then attach some default cgroup values then. I tried just using su but that didn't work. The only other thing I can think of is to actually set a password on the user and ssh in locally, which seems like a headache. Is there a simple tool for initiating a log in that might create a user's slice? Or even a better approach to this problem?

Cheers!

Rooster
  • 485
  • 2
  • 7
  • 21

0 Answers0