<div><div dir="auto">Hi again, </div></div><div dir="auto"><br></div><div dir="auto">Just would like to update that when i restart dbus service, the issue does not happen.</div><div dir="auto"><br></div><div dir="auto">Brs, </div><div dir="auto">Bao</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Feb 28, 2019 at 6:21 PM Bao Nguyen <<a href="mailto:baondt@gmail.com">baondt@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello everyone,<br>
<br>
I am using systemd 228. When the system starts successfully, I tried<br>
to login to my system via ssh with my one of setting users, and I can<br>
log in successfully but systemd throws an error message:<br>
<br>
"Failed to get unit: Access denied"<br>
<br>
When I trace code of systemd, I found the message thrown from the<br>
method call via sdbus. This is one of function I added in systemd<br>
source<br>
<br>
r = sd_bus_call_method(<br>
bus,<br>
"org.freedesktop.systemd1",<br>
"/org/freedesktop/systemd1",<br>
"org.freedesktop.systemd1.Manager",<br>
"GetUnit",<br>
&error_message,<br>
&reply_return,<br>
"s", name_unit);<br>
if (r < 0) {<br>
return log_errno(r, "Failed to get unit: %s",<br>
bus_error_message(&error_message, r));<br>
}<br>
<br>
But somehow it cannot call GetUnit method from interface<br>
org.freedesktop.systemd1.Manager with error "Access denied". Could you<br>
please let me know what the error message of this method call means ?<br>
Does it relate any to user permission and if any setting permission of<br>
user can cause the method called via sdbus can not retrieve unit<br>
object path for a unit name during ssh?<br>
<br>
Thanks a lot,<br>
Brs,<br>
Naruto<br>
</blockquote></div></div>