Gentoo Archives: gentoo-dev

From: Daniel Pielmeier <daniel.pielmeier@××××××××××.com>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Managing users and groups
Date: Sun, 09 Sep 2007 02:57:14
Message-Id: 46E35EBB.8070508@googlemail.com
1 Hi,
2
3 I have recently checked the contents of /etc/{group,passwd,shadow} and
4 found that there are users and groups which are not needed anymore
5 because the packages which need them have also been removed. I have
6 deleted some of them which are unnecessary with userdel and groupdel.
7
8 I have experienced that some ebuilds use enewuser and enewgroup to
9 create users and groups which are needed. Some print a elog notice in
10 pkg_postinst to inform the user to create them manually.
11
12 I think it would be a good idea to either leave it to the user (inform
13 them via pkg_postinst) to create the groups and users or better create
14 the needed groups and users in pkg_preinst and remove them at uninstall
15 in pkg_postrm (edeluser end edelgroup may have to be implemented to
16 achieve this). In this case the configuration files did not get
17 cluttered with unneeded entries. To be sure that no group or user is
18 removed which is still needed some kind of configuration file could be
19 used to prevent the deletion of shared groups/users. With contents like
20 group/user X needed by ebuild Y.
21
22 While writing this i have found GLEP-27. What is the current status
23 concerning this?
24
25 Regards,
26
27 Daniel
28
29
30 --
31 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Managing users and groups Mike Frysinger <vapier@g.o>