MacPorts is hijacking account on MacOSXServer

Rainer Müller raimue at macports.org
Mon Jul 25 16:10:51 PDT 2011


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?

Rainer


More information about the macports-dev mailing list