Re: how to keep eth link down across reboots ?

2023-12-07 Thread Mantas Mikulėnas
On boot, interfaces are admin-down *by default* until something explicitly
brings them up. If you don't configure any network management software to
bring eth0 up, then it'll be down.

On Thu, Dec 7, 2023, 22:52 lejeczek  wrote:

> Hi guys.
>
> Perhaps not strictly _systemd_ question but community here surely is
> capable - a matter of me being lucky - how would you keep an Ethernet
> link/port powered down?
> I was thinking I'll try first _udev_ rules - given other tools/managers
> are told to stay away from the link/port
> Is there a better, best way to put such link/port down & keep it that way
> - naturally, please steer clear of "unplug the cable" type of ideas.
>
> many thanks, L.
>


Re: [systemd-devel] Manual start of user@.service failed with permission denied

2023-12-07 Thread Lennart Poettering
On Do, 07.12.23 18:29, Christopher Wong (christopher.w...@axis.com) wrote:

> Hi Lennart,
>
> We are doing the steps to start up a rootless docker. If I don’t set 
> XDG_RUNTIME_DIR then I will get the below error:
>
> systemd[1925]: Trying to run as user instance, but $XDG_RUNTIME_DIR
> is not set.

pam_systemd is responsible for setting this env var. Most likely you
are missing that from the PAM stack that is used by this user@.service
instance?

> The 503 is a system user. So, just to try it out, I created a user,
> which got the UID 1001. Using that UID gave me the same result as
> the 503.

It's a bad idea to run user stuff as system user.

Lennart

--
Lennart Poettering, Berlin


Re: [systemd-devel] Manual start of user@.service failed with permission denied

2023-12-07 Thread Christopher Wong
Hi Lennart,

We are doing the steps to start up a rootless docker. If I don’t set 
XDG_RUNTIME_DIR then I will get the below error:

systemd[1925]: Trying to run as user instance, but $XDG_RUNTIME_DIR is not set.

The 503 is a system user. So, just to try it out, I created a user, which got 
the UID 1001. Using that UID gave me the same result as the 503.

Best regards,
Christopher Wong



From: Lennart Poettering 
Date: Wednesday, 6 December 2023 at 16:50
To: Christopher Wong 
Cc: systemd-devel@lists.freedesktop.org 
Subject: Re: [systemd-devel] Manual start of user@.service failed with 
permission denied
On Mi, 06.12.23 14:46, Christopher Wong (christopher.w...@axis.com) wrote:

> Hi,
>
> I’m trying to do the following:
>
> root@host:~# systemctl set-environment
> XDG_RUNTIME_DIR="/run/user/503"

Why would you do that?

user@.service automatically pulls in user-runtime-dir@.service which
is responsible for creating that dir with right perms.

is 504 a system user? or a regular user?

systemd generally assumes the boundary between system and regular
users is between 999 and 1000.

But user@.service is really just for regular users, not system users,
hence my question.

Lennart

--
Lennart Poettering, Berlin


how to keep eth link down across reboots ?

2023-12-07 Thread lejeczek

Hi guys.

Perhaps not strictly _systemd_ question but community here 
surely is capable - a matter of me being lucky - how would 
you keep an Ethernet link/port powered down?
I was thinking I'll try first _udev_ rules - given other 
tools/managers are told to stay away from the link/port
Is there a better, best way to put such link/port down & 
keep it that way - naturally, please steer clear of "unplug 
the cable" type of ideas.


many thanks, L.