You are not logged in.

#1 2023-09-25 03:24:10

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 268

[SOLVED] Automatic users creation, _talkd in particular

I noticed user and group _talkd is created during last update:

...
:: Running post-transaction hooks...
( 1/22) Creating system user accounts...
Creating group '_talkd' with GID 965.
Creating user '_talkd' (User for legacy talkd server) with UID 965 and GID 965.
...

/etc/passwd:

_talkd:x:975:975:User for legacy talkd server:/:/usr/bin/nologin

/etc/group

_talkd:x:975:

After some investigation i guessed it is created by systemd because it is mentioned in /usr/lib/systemd/system/talk.service owned by inetutils package:

[Unit]
Description=Talk Server
Documentation=man:talkd(8) man:talk(1)

[Service]
User=_talkd
Group=tty
ExecStart=/usr/bin/talkd
StandardInput=socket

[Install]
Also=talk.socket

If i delete the user manually, it is created again after systemd re-install, even if talkd.service is masked.
talk.service is not enabled in my system. I'm not going to use it.

Is it possible to prevent systemd to create users and groups other than specified in /usr/lib/sysusers.d/ and /etc/sysusers.d/ ?

UPD: systemd 254.4-2

Last edited by dimich (2023-09-25 03:31:43)

Offline

#2 2023-09-25 03:31:23

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 268

Re: [SOLVED] Automatic users creation, _talkd in particular

I just found inetutils installs /usr/lib/sysusers.d/inetutils.conf. Sorry for noise, marking as solved.

Offline

#3 2023-09-25 09:43:24

GeneArch
Member
Registered: 2013-07-28
Posts: 92

Re: [SOLVED] Automatic users creation, _talkd in particular

Offline

#4 2023-09-25 10:08:46

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 268

Re: [SOLVED] Automatic users creation, _talkd in particular

GeneArch wrote:

Thanks for link. I understand the reason for this update.
As i know systemd allows to create "dynamic users" and i'm wondering it is not used for talkd.

Offline

#5 2023-09-25 10:42:20

GeneArch
Member
Registered: 2013-07-28
Posts: 92

Re: [SOLVED] Automatic users creation, _talkd in particular

Ah right gotcha.

Maybe you can submit a RFE or a PR for arch inetutils to change " User=_talkd "to "DynamicUser=yes " in the systemd service file and remove the "inetutils.sysusers " file as no longer needed.
Package should also remove the _talkd user/group if it already exists when it is installed.

Offline

#6 2023-09-25 10:53:04

loqs
Member
Registered: 2014-03-06
Posts: 18,130

Re: [SOLVED] Automatic users creation, _talkd in particular

GeneArch wrote:

Package should also remove the _talkd user/group if it already exists when it is installed.

That is never done see [1].

[1] https://archlinux.org/todo/usergroup-management/

Offline

#7 2023-09-25 11:00:32

GeneArch
Member
Registered: 2013-07-28
Posts: 92

Re: [SOLVED] Automatic users creation, _talkd in particular

Right. Just means it would be up to users to delete or leave _talkd.
I like the DynamicUser suggestion for this usecase

Offline

#8 2023-09-25 11:23:30

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 268

Re: [SOLVED] Automatic users creation, _talkd in particular

GeneArch wrote:

Maybe you can submit a RFE or a PR for arch inetutils to change " User=_talkd "to "DynamicUser=yes " in the systemd service file

I requested #68659 for reopen.

Offline

Board footer

Powered by FluxBB