Is it possible to influence at what UID MacPorts start to create users?
Gerben Wierda
gerben.wierda at rna.nl
Fri Aug 16 06:31:34 UTC 2019
> On 16 Aug 2019, at 01:13, Ryan Schmidt <ryandesign at macports.org> wrote:
>
>
>
> On Aug 14, 2019, at 17:49, Gerben Wierda wrote:
>
>> If this is a bug, I suggest using 600, not 500 for the fix.100 local users on a mac seems adequate (like 640kB…) and server starts at 1025, so ample room for services.
>
> As I said, I believe our intention was to use the same range of UIDs and GIDs that Apple used to create normal user accounts. If Apple starts at 501, it was a bug for us to start at 500, and the fix for the bug would be to start at 501.
>
> Note that we also create a "macports" user and group at MacPorts installation time. The code for that is separate from the code that creates users and groups for ports. There are two copies of the "macports" user/group creation code: one in Makefile.in for users who build from source, and one in the Installer package, the source for which is in portmgr/dmg/postflight.in. Both of these search for an empty UID starting at 501, not 500. And they don't specify what range to use for group IDs; they just ask the system for the next free GID.
>
> If you want our range not to overlap Apple's range, that's a separate feature request that we could certainly consider. Off the top of my head I can't think of any problems with that but I don't know why it was originally chosen to overlap Apple's range.
>
> Note that our user handling originates from an old version of Mac OS X in which Apple created both a UID and a GID for each user. (Tiger and earlier maybe?) Current versions of macOS no longer do that; for example my main user is not a member of its own group, but rather of the group "staff". I don't know if it still makes sense for us to create a separate group for each user that we create, but I suppose that's another separate issue.
I know that latter. For services and daemons, Apple still creates user/groups with identical separate names. And these are what the MacPorts generally need. For actual users, even in the NeXT days if I recall correctly, it was multiple users in a group like staff/admin/wheel (very early, the latter two for admin users), but I might be wrong here.
luna:~ gerben$ dscl . -list /Users
_amavisd
_analyticsd
_appleevents
_applepay
_appowner
_appserver
_appstore
etc
luna:~ gerben$ dscl . -list /Groups
_amavisd
_analyticsd
_analyticsusers
_appleevents
_applepay
_appowner
_appserveradm
_appserverusr
_appstore
etc
If you have multiple Macs and you want to have the same uid for users on them, you create them in the same order. Now, normally you do that at the start before you get to do things like MacPorts, but in this case I did not.
So, what I need is build macports from source if I want to change this behaviour?
G
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20190816/209f2332/attachment.html>
More information about the macports-users
mailing list