MacPorts is hijacking account on MacOSXServer
Bradley Giesbrecht
pixilla at macports.org
Mon Jul 25 16:47:51 PDT 2011
On Jul 25, 2011, at 4:18 PM, Rodolfo Aramayo wrote:
> On Mon, Jul 25, 2011 at 18:10, Rainer Müller <raimue at macports.org> 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?
>
> YES. because in this case the user had access to the computer but not
> a local account so it was not listed as local but as having a network
> account
Rodolfo, Is your open directory domain in this list?
dscl localhost -list .
Does this produce a unique $newID?
newID=501; \
for node in $(dscl localhost -list .); do \
tempID=$(($(dscl . -list /Users UniqueID | /usr/bin/awk '{print $2}' | sort -ug | tail -1)+1)); \
echo $tempID; \
echo $newID; \
[ $tempID -gt $newID ] && newID=$tempID; \
echo $newID; \
done
Regards,
Bradley Giesbrecht (pixilla)
More information about the macports-dev
mailing list