Re: [systemd-devel] Cannot call GetUnit method with ssh

2019-03-12 Thread Lennart Poettering
On Di, 12.03.19 18:17, Bao Nguyen (bao...@gmail.com) wrote: > Hi again, > > I tried to add the LDAP user in /etc/dbus-1/system.conf policy and then > send signal SIGHUP to reload the configuration, also for dbus flush user > cache, but dbus said that > > Unknown username "ldap_demo" on element >

Re: [systemd-devel] Cannot call GetUnit method with ssh

2019-03-12 Thread Bao Nguyen
Hi Mantas, Thanks for your reply. "Hold on – why are you whitelisting individual users for systemd.GetMethod()? " Sorry I am not clear your question. My intend is to add a user that fails to authenticate with DBUS in the previous email to policy config file to troubleshoot if dbus resolve it

Re: [systemd-devel] Cannot call GetUnit method with ssh

2019-03-12 Thread Mantas Mikulėnas
On Tue, Mar 12, 2019 at 1:17 PM Bao Nguyen wrote: > Hi again, > > I tried to add the LDAP user in /etc/dbus-1/system.conf policy and then > send signal SIGHUP to reload the configuration, also for dbus flush user > cache, but dbus said that > > Unknown username "ldap_demo" on element > Reloaded

Re: [systemd-devel] Cannot call GetUnit method with ssh

2019-03-12 Thread Bao Nguyen
Hi again, I tried to add the LDAP user in /etc/dbus-1/system.conf policy and then send signal SIGHUP to reload the configuration, also for dbus flush user cache, but dbus said that Unknown username "ldap_demo" on element Reloaded configuration I search the source code in dbus. it will call

Re: [systemd-devel] Cannot call GetUnit method with ssh

2019-03-08 Thread Lennart Poettering
On Fr, 08.03.19 11:59, Mantas Mikulėnas (graw...@gmail.com) wrote: > > dbus policy can only reference users that are available locally at any > > time, i.e. generally system users, not human users. > > > > > Hmm, but in this case, the client seems to be completely refused access to > the bus –

Re: [systemd-devel] Cannot call GetUnit method with ssh

2019-03-08 Thread Bao Nguyen
Hi Lennart & Mantas, Thanks a lot for your quick response. Maybe you're right, dbus-daemon resolves users mentioned in its policy files at start-up. And then adding a new user to LDAP, dbus-daemon has not resolved yet so it do not allow to access system bus. That may be the reason that restart

Re: [systemd-devel] Cannot call GetUnit method with ssh

2019-03-08 Thread Mantas Mikulėnas
On Fri, Mar 8, 2019 at 11:54 AM Lennart Poettering wrote: > On Fr, 08.03.19 16:05, Bao Nguyen (bao...@gmail.com) wrote: > > > Hi Lennart, > > > > After debugging the problem, when strace the busctl call method command > > > > strace -f -tt busctl call org.freedesktop.systemd1 > >

Re: [systemd-devel] Cannot call GetUnit method with ssh

2019-03-08 Thread Lennart Poettering
On Fr, 08.03.19 16:05, Bao Nguyen (bao...@gmail.com) wrote: > Hi Lennart, > > After debugging the problem, when strace the busctl call method command > > strace -f -tt busctl call org.freedesktop.systemd1 > /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager GetUnit s >

Re: [systemd-devel] Cannot call GetUnit method with ssh

2019-03-08 Thread Bao Nguyen
Hi Lennart, After debugging the problem, when strace the busctl call method command strace -f -tt busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager GetUnit s sys-devices-platform-serial8250-tty-ttyS6.device 07:54:32.027830 connect(3,

Re: [systemd-devel] Cannot call GetUnit method with ssh

2019-03-01 Thread Bao Nguyen
Hi Lennart, Thanks for your information. I do not use selinux. Could you please show me how to enable dbus log? I found this thread https://wiki.ubuntu.com/DebuggingDBus, not sure it works but I'll give it a try. BTW, last time when I enable systemd debug systemd.log_level=debug, I found this

Re: [systemd-devel] Cannot call GetUnit method with ssh

2019-03-01 Thread Bao Nguyen
Hi Mantas, Thanks for our reply. No, my /usr has not any special setup, it is already in initrd. Brs, Naruto On Fri, Mar 1, 2019 at 4:33 PM Mantas Mikulėnas wrote: > > Does your system have any sort of special setup for /etc or /usr? > > It sounds very much like /usr is on a separate

Re: [systemd-devel] Cannot call GetUnit method with ssh

2019-03-01 Thread Lennart Poettering
On Do, 28.02.19 18:21, Bao Nguyen (bao...@gmail.com) wrote: > Hello everyone, > > I am using systemd 228. When the system starts successfully, I tried > to login to my system via ssh with my one of setting users, and I can > log in successfully but systemd throws an error message: > > "Failed to

Re: [systemd-devel] Cannot call GetUnit method with ssh

2019-03-01 Thread Mantas Mikulėnas
Does your system have any sort of special setup for /etc or /usr? It sounds very much like /usr is on a separate filesystem that's not yet mounted at the time of system boot, so dbus-daemon cannot find its configuration at that time. When /usr is separate, it must be pre-mounted by the initramfs.

Re: [systemd-devel] Cannot call GetUnit method with ssh

2019-02-28 Thread Bao Nguyen
Hi again, Just would like to update that when i restart dbus service, the issue does not happen. Brs, Bao On Thu, Feb 28, 2019 at 6:21 PM Bao Nguyen wrote: > Hello everyone, > > I am using systemd 228. When the system starts successfully, I tried > to login to my system via ssh with my one of

[systemd-devel] Cannot call GetUnit method with ssh

2019-02-28 Thread Bao Nguyen
Hello everyone, I am using systemd 228. When the system starts successfully, I tried to login to my system via ssh with my one of setting users, and I can log in successfully but systemd throws an error message: "Failed to get unit: Access denied" When I trace code of systemd, I found the