Re: Login 'postgres': Login class 'default': Setting priority failed: Permission denied

From: Denis Shaposhnikov <dsh_at_bamus.cz>
Date: Thu, 27 Jun 2024 20:15:09 UTC
Hi,

On Thu, 27 Jun 2024, at 21:57, Paul Procacci wrote:
> It *does* throw an error.  You just need to set the priority in the 
> right direction:
>
> # nice -n 5 id
> uid=0(root) gid=0(wheel) groups=0(wheel),5(operator)
>
> # nice -n -5 id
> nice: setpriority: Permission denied
> uid=0(root) gid=0(wheel) groups=0(wheel),5(operator)

That's correct, but in my case nobody directly decreases the priority.

> 1) Remove the nice binary from the command that icinga is issuing.

Icinga does it inside it's daemon. And patching it just because this FreeBSD change doesn't look good.

> 3) Redirect stderr to /dev/null.

Log messages are from syslog, from /var/log/messages. Every minute syslog outputs such messages.

I found a workaround. I changed default class in /etc/login.conf from

priority=0

to

priority=inherit

So it looks like every jail must have `priority=inherit` in /etc/login.conf instead of default `priority=0`.

Thanks for the help.