Re: systemd --user enable: Failed to connect to bus: No such file or directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Sat, Jun 30, 2018 at 13:34:11 +0200, Bjoern Franke wrote:
> > Are you truly logged in as this second user for whom it does not work,
> > or just su(1)'d, etc?
> 
> Erm, just used "sudo -u user2 -s" to login as user2. I assumed spawning
> an own zsh as user2 would do the right thing.

-s only spawns a regular shell as the user; to get a login shell, it's
`sudo -i`.

That being said, from what I've experienced, sudo on its own (be it with
-s or -i) is not sufficient to control user sessions (I don't know dbus
well enough to explain why, though). What I usually do is:

    sudo machinectl --uid user2 shell .host

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux