[Cialug] systemctl user ; environment variables

Shane Nehring shane at ntoast.com
Tue Mar 15 20:24:18 UTC 2022


The -i is probably what's doing it, as that'd go through the whole login
process.
I'm not sure why the gdm prompt isn't doing that as well, it may be a pam
configuration thing. pam_sss might not be in the session section for that
stack,  but may be for the sudo one.

On Tue, Mar 15, 2022 at 3:16 PM Todd Walton <tdwalton at gmail.com> wrote:

> On Mon, Mar 14, 2022 at 3:02 PM Shane Nehring <shane at ntoast.com> wrote:
>
> > Are you su-ed as the user? Systemd is getting really picky about that
> >
>
> I am not. I start the computer and it comes up to graphical.target. At the
> gdm login screen I log in as me and then open a terminal window.
>
>  or do the systemd su thing I can't remember off the top of my head.
> >
>
> If I do `machinectl shell 1000 at .host /usr/bin/systemctl --user` it works.
> Also, it works if I do this:
>
> $ sudo -u todd -i
> $ export XDG_RUNTIME_DIR=/run/user/$(id -u)
> $ /usr/bin/systemctl --user
>
>
> And, interestingly, right after I exit that sudo'd session, I can run
> the systemctl --user as well. But just doing the export doesn't fix
> it. sudo-ing to myself set something correctly. I dunno what.
>
> --
> Todd
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> https://www.cialug.org/cgi-bin/mailman/listinfo/cialug
>


More information about the Cialug mailing list