I want a reduced priority for non-root users on CentOS. In /etc/security/limits.conf, do I need to specify this with a default, wildcard-domain entry and also provide one for root, so that a root user does not use this priority?

The man page for limits.conf on Ubuntu says, "NOTE: group and wildcard limits are not applied to the root user. To set a limit for the root user, this field must contain the literal username root." By contrast, the man page for limits.conf on CentOS does not mention this. When I add * - priority 15 to limits.conf on CentOS, then ssh in as root, my nice is set to 15. Without that entry, it's 0. If I also add root - priority 0, root nice is once again 0, but this line shouldn't be needed, should it?


Yes, you need an entry for root. The CentOS man page does not mention an exception for root because there is no exception for root. The Ubuntu man page mentions an exception for root because on Ubuntu, there is an exception for root. The documentation is correct on both systems.

The exception for root in Ubuntu is a Debian-specific patch (i.e. a patch applied by Debian, and inherited by its derivatives). This patch was made to address bug 63230. I don't know why it wasn't applied upstream.

Your Answer

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

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