> On 10 Sep 2024, at 21:30, Ryan Carsten Schmidt <[email protected]> 
> wrote:
> 
> On Sep 10, 2024, at 06:08, Gerben Wierda wrote:
>> 
>> Is there a way I can clone the MacPorts created users/groups first keeping 
>> them at the same uid/gid and then do a reinstall, so MacPorts finds already 
>> created users and leaves them alone?
> 
> If MacPorts needs a user account that doesn't exist it creates it with the 
> next available UID. If matching UIDs between systems are important to you you 
> can precreate users on the second system with UIDs matching those on the 
> first system. MacPorts doesn't contain any code to help you do that so you'll 
> be writing it yourself. MacPorts contains no code that keeps track of what 
> users have been created either so you'll need to figure that out too.

I know that MacPorts doesn't do that. I was just asking the people here who 
generally know more of these systems than average how they would go about doing 
this.

Basically, my plan is to compare the local database 
(/var/db/dslocal/nodes/Default) to see which items have been created by 
MacPorts installs, copy these over so that a next MacPorts install would find 
the users already created

But dscl cannot really do import/output so copying the plists is probably the 
easiest option. I don't know if such a file based approach works (nothing 
changed elsewhere on the system?) 

G

Reply via email to