newer shadow packages have this option for useradd: --8<-- -r, --system Create a system account. System users will be created with no aging information in /etc/shadow, and their numeric identifiers are choosen in the SYS_UID_MIN-SYS_UID_MAX range, defined in login.defs, instead of UID_MIN-UID_MAX (and their GID counterparts for the creation of groups). --8<-- ...and groupadd: --8<-- -r, --system Create a system group. The numeric identifiers of new system groups are choosen in the SYS_GID_MIN-SYS_GID_MAX range, defined in login.defs, instead of GID_MIN-GID_MAX. --8<-- finally, this allows one to have distinct ID ranges for accounts created for system users/groups (e.g. created by portage) and for manually created accounts (e.g. for human users). the corresponding defaults in /etc/login.defs are: --8<-- # # Min/max values for automatic uid selection in useradd # UID_MIN 1000 UID_MAX 60000 # System accounts SYS_UID_MIN 100 SYS_UID_MAX 999 # # Min/max values for automatic gid selection in groupadd # GID_MIN 1000 GID_MAX 60000 # System accounts SYS_GID_MIN 100 SYS_GID_MAX 999 --8<-- please make enewuser/enewgroup from eutils.eclass support those system accounts with those later shadow packages. thanks!
That would be a quite handy enhancement IMHO.
any news on this one? :)
There's a patch in bug #262559 which allows enewgroup to use SYS_GID_MIN/MAX. Unfortunately, this patch is lost after every sync so to implement this patch, one could write a simple script including the following commands until the patch is in portage: emerge --sync patch --forward -d /usr/portage/eclass < /path/to/eutils.patch I use it all the time!
(In reply to comment #3) > There's a patch in bug #262559 which allows enewgroup to use SYS_GID_MIN/MAX. > > Unfortunately, this patch is lost after every sync so to implement this patch, > one could write a simple script including the following commands until the > patch is in portage: > > emerge --sync > patch --forward -d /usr/portage/eclass < /path/to/eutils.patch > > I use it all the time! > Bad idea. That's not how you use a modified eclass. Instead you copy it to overlay, edit it, and set FEATURES="metadata-transfer" for it to be in effect.
I applied the patch in portage overlay, now I know how you use a modified eclass, thanx! Now I have another problem, because I see eutils.eclass has been changed (the function epatch_user has been added) so I had to patch this one in overlay again. Now my question, is there any news on this bug? I'm asking because otherwise I find myself monitoring changes in eutils.eclass and re-applying the patch in overlay everytime eutils.eclass has been changed...
This is fixed in the tree.
*** Bug 279608 has been marked as a duplicate of this bug. ***