You are not logged in.

#1 2022-06-17 09:18:21

tethys
Member
Registered: 2019-08-13
Posts: 69

[Solved] New group/user when installing new package

Just a couple of questions for my understanding. I installed the package monero and during the installation, in pacman.log, I see:

[ALPM] running '20-systemd-sysusers.hook'...
[ALPM-SCRIPTLET] Creating group 'monero' with GID 969.
[ALPM-SCRIPTLET] Creating user 'monero' (n/a) with UID 969 and GID 969.

Three questions:
1) What told pacman to make a neu user/group monero? I cannof find in the .conf files included in monero package anything that says that a new system user accound should be made.
2) I can see that "20-systemd-sysusers.hook" creates system user accounts, but why specifically 969? That is, if I install the same package on another computer, can UID/GID be different?
3) If I uninstall the package, will this "monero" UID/GID be removed? If yes, where is the information stored to remove specifically the UID/GID 969? Or will simply the user/group "monero" be removed?

Last edited by tethys (2022-06-17 10:33:35)

Offline

#2 2022-06-17 09:55:02

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 10,140

Re: [Solved] New group/user when installing new package

1.

Run

pacman -Ql monero

Check the files under /usr/lib .

2.
They will be different. see man systemd-sysusers and the files you found in 1.

3.
The UID/GID will NOT be removed upon uninstalling .

pacman has no way of knowing what files/folders are owned by monero usr/group somewhere on your system.
If pacman removed the monero user/group accessing those files would be problematic .

Last edited by Lone_Wolf (2022-06-17 09:55:54)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2022-06-17 09:57:30

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 10,760
Website

Re: [Solved] New group/user when installing new package

1) /usr/lib/sysusers.d/monero.conf (see `man sysusers.d` about what the 'u' means -- I suspect this is where your confusion lies)
2) Yes. See above man page for explanation about how the ID choice is made.
3) No, the entries will remain in /etc/{passwd,group,shadow,gshadow}. This is by design, as reusing IDs is bad security practice.

EDIT: Too slow.

Last edited by WorMzy (2022-06-17 09:57:56)


Sakura:-
Mobo: MSI MEG B550 UNIFY // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#4 2022-06-17 10:33:54

tethys
Member
Registered: 2019-08-13
Posts: 69

Re: [Solved] New group/user when installing new package

Thank you for your answers Lone_Wolf and WorMzy.

1) Solved: As I understand, "u" in /usr/lib/sysusers.d/monero.conf is the instruction to make a new user.
2) Solved as well.
3) Solved, Lone_Wolf's argument makes sense. I was thinking about the case where I uninstall the package without having used it.

Offline

#5 2022-06-17 10:41:23

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 10,760
Website

Re: [Solved] New group/user when installing new package

Close, 'u' creates both a user and group:

man sysusers.d wrote:
       u
           Create a system user and group of the specified name should they not exist yet. [...]

Sakura:-
Mobo: MSI MEG B550 UNIFY // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB