MacPorts is hijacking account on MacOSXServer

Ben Greenfield ben at cogs.com
Tue Jul 26 04:17:56 PDT 2011


On Jul 25, 2011, at 7:10 PM, Rainer Müller wrote:

> On 2011-07-26 00:53 , Daniel J. Luke wrote:
>> On Jul 25, 2011, at 6:26 PM, David L Ballenger wrote:
>>> On my laptop, which is connected to my Open Directory domain, my personal 
>>> account is set up as a mobile accoun, which means I have an account int the
>>> local domain with a UID of 1025 and macports got an ID of 1026.  That meant
>>> that the Open Directory user with that ID (my wife) could no longer log into
>>> her network account using my laptop.
>> 
>> So, there was already an OD account with ID 1026 (or did you try to set up your wife's account later, and that failed?)
>> 
>> I _think_ getpwuid() should pull in the information from OD (and maybe there's a lion change/bug that is causing the issue?). Certainly the manpage on 10.6 says "These functions obtain information from DirectoryService(8)"
> 
> The macports user itself is not being created there, but in the
> portmgr/dmg/postflight script.
> 
> The essential command is this one:
> 
> ${DSCL} -q . -create /Users/${RUNUSR} UniqueID $(($(${DSCL} . -list
> /Users UniqueID | /usr/bin/awk '{print $2}' | sort -ug | tail -1)+1))
> 
> So here we are looking for the greatest ID in use and take the next one.
> 
> Could it be that this kind of account is not recognized as we are
> querying "." (the local domain) only?

Since it is a portable home directory the macports install could take place and the account in the domain created before the laptop and the Directory domain meet.

I would have thought that macports would grab a uid below a 1000 open directory  accounts default to 1000 and I always assumed it was to avoid collision with local uids

Ben



> 
> Rainer
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users



More information about the macports-users mailing list