<div dir="ltr">Systemd D-Bus services use polkit for authorization when the message is sent by someone not uid 0. Depending on which version you have, you can write a .pkla file (Debian) or a JavaScript function (other distros) that allows a specific action for a specific user or group.<div><br></div><div>You'll want to allow the "org.freedesktop.timedate1.set-timezone" action (see `pkaction`). Recent versions have some documentation in `man 8 polkit`.<div><br></div><div>If the system doesn't have polkit installed, then all you have is the hardcoded "uid == 0" check. (Polkit *is* the configuration facility for that.)</div></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 17, 2021 at 8:18 PM Greg Wilson-Lindberg <<a href="mailto:GWilson@sakuraus.com">GWilson@sakuraus.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">First, I hope that I have found the proper list for this question, if not I'm sorry to bother you all.<br>
<br>
I'm trying to run a program that changes the timezone. Our application is using the dbus facility to change the time zone. It works when run as root but fails when run as our user. I had thought initially that the problem was with dbus permissions but have since found out that the fact that the messages are going over the dbus means that the dbus permissions are set correctly.<br>
<br>
So, it seems that the systemd.timedate1 utility has it's own permissions that is rejecting our request to change the timezone. My question at this point becomes, how do I change the permissions for the system.timedate1 utility to allow my non-root user to change the time and timezone?<br>
<br>
Regards,<br>
Greg Wilson-Lindberg<br>
_______________________________________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org" target="_blank">systemd-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Mantas Mikulėnas</div></div>