Clarify how to add a user/group
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lsb |
In Progress
|
Medium
|
Unassigned | ||
Mandriva |
In Progress
|
Wishlist
|
Bug Description
Write up some guidance on how to add a user/group if this is needed by a
package. Presumably, useradd/groupadd should be used in a postinstall script.
Should it check first if the account exists? Should it be removed on package
uninstall? (Note: it appears current usage is No for both, is that best
practice?). If an existence test is to be done, how? What happens if the system
is using network account administration (NIS or LDAP)? Is useradd still the
right tool? I would expect yes, as the added users/groups are usually for use
by daemons that should have the right ownership even if the network service is
not running.
Also, user/group IDs for daemon use are typically in the "system" range, LSB
recommends these be automatically allocated from the range 100-499 by useradd.
I don't see a way for this to happen. LSB does document the "-r" option to
reserve from the system range, which in my tests gives back a number <99 (which
the LSB says should not be used by addon packages). Without this option, the
number given back is typically higher than 500. This may the subject of a
separate bug (spec or test, depending on what we think the behavior should be).
This discussion is a paraphrase of questions raised on the rpm mailing list (a
non-LSB thread) - generally goes to guidance to developers.
Changed in mandriva: | |
importance: | Unknown → Wishlist |
status: | Unknown → In Progress |