You are not logged in.

#1 2018-12-17 17:33:13

ua4000
Member
Registered: 2015-10-14
Posts: 130

[SOLVED] pacman -Rns doesn't invoke userdel ?

I removed some installed packages with pacman -Rns some time ago.
While wandering through my system I found now some leftovers, which I had to clean-up by myself:

sudo userdel lxdm
sudo userdel sddm
sudo userdel dnsmasq

They were automatically created by those packages - I expected pacman to clean them up too while using -Rns ?

Did I miss something here ?

Thanks for all hints.

Last edited by ua4000 (2018-12-17 18:20:52)

Offline

#2 2018-12-17 17:43:17

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 20,770
Website

Re: [SOLVED] pacman -Rns doesn't invoke userdel ?

Nope.  The users are created via a file in  /usr/lib/sysusers.d/ which belongs to the package.  At each boot, this file ensures the user exists, and instructs systemd to create it if it does not.  When you remove the package, this file is removed.  So from then on there will be nothing recreating the user if it is missing, but this does not remove the existing user.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2018-12-17 17:50:38

ua4000
Member
Registered: 2015-10-14
Posts: 130

Re: [SOLVED] pacman -Rns doesn't invoke userdel ?

Thanks very much for the clarification.
In case of sddm, the provided sddm.sysusers is the one which instructs systemd to create the "sddm" user ?

Offline

#4 2018-12-17 17:59:35

loqs
Member
Registered: 2014-03-06
Posts: 6,662

Re: [SOLVED] pacman -Rns doesn't invoke userdel ?

Yes usr/lib/sysusers.d/sddm.conf
See also https://www.archlinux.org/todo/usergroup-management/ and `man 8 systemd-sysusers`

Online

#5 2018-12-17 18:12:20

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 2,700

Re: [SOLVED] pacman -Rns doesn't invoke userdel ?

We stopped doing userdel a long time ago due to https://www.archlinux.org/todo/usergroup-management/

tl;dr It's a security risk to remove the users automatically, and they don't really cause any harm.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#6 2018-12-17 18:20:39

ua4000
Member
Registered: 2015-10-14
Posts: 130

Re: [SOLVED] pacman -Rns doesn't invoke userdel ?

Thanks very much!

Offline

#7 2018-12-17 18:21:50

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 126
Website

Re: [SOLVED] pacman -Rns doesn't invoke userdel ?

eschwartz wrote:

...they don't really cause any harm.

If you remove (for example) the git package, it causes to fail shadow.service, because /usr/bin/git-shell has been removed.

Last edited by Tarqi (2018-12-17 22:00:24)


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#8 2018-12-17 22:59:15

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 7,103

Re: [SOLVED] pacman -Rns doesn't invoke userdel ?

Tarqi wrote:
eschwartz wrote:

...they don't really cause any harm.

If you remove (for example) the git package, it causes to fail shadow.service, because /usr/bin/git-shell has been removed.

Which doesn't cause any harm.

Offline

#9 2018-12-17 23:07:29

Tarqi
Member
From: Ixtlan
Registered: 2012-11-27
Posts: 126
Website

Re: [SOLVED] pacman -Rns doesn't invoke userdel ?

Scimmia wrote:
Tarqi wrote:
eschwartz wrote:

...they don't really cause any harm.

If you remove (for example) the git package, it causes to fail shadow.service, because /usr/bin/git-shell has been removed.

Which doesn't cause any harm.

Instead of explaining why this is just your opinion: You've won, I'm out.

Last edited by Tarqi (2018-12-17 23:16:17)


Knowing others is wisdom, knowing yourself is enlightenment. ~Lao Tse

Offline

#10 2018-12-17 23:39:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 20,770
Website

Re: [SOLVED] pacman -Rns doesn't invoke userdel ?

That was an odd reaction.  It was a simple statement of fact*.  If you wanted further clarification, ask for it.  Some of us around here are occasionally rather abrupt, but there was no way to interpret this comment of Scimmia's as anything of the sort.

*I.e., it was a factual statement that may be true or false.  If you have evidence that it is false - if you have seen harmful results - you'd certainly be welcome to disagree.

Last edited by Trilby (2018-12-17 23:43:27)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#11 2018-12-17 23:59:20

loqs
Member
Registered: 2014-03-06
Posts: 6,662

Re: [SOLVED] pacman -Rns doesn't invoke userdel ?

It could be argued that once such a situation has occurred there is not utility offered by shadow.service.

Online

Board footer

Powered by FluxBB