Opened 10 years ago

#46139 new defect

postflight.in v2.3.1 Error determining network user's shell

Reported by: grigutis@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: base Version: 2.3.3
Keywords: Cc:
Port:

Description

OS X version: 10.10.1 Xcode version: 6.1.1

My system is bound to Active Directory and I'm logged in as an AD user, so my account doesn't live in the local domain. For me, running the package installer fails to set the MacPorts environment correctly.

installd[1321]: ./postinstall: <dscl_cmd> DS Error: -14136 (eDSRecordNotFound)
installd[1321]: ./postinstall: Unknown shell ()! Please set your MacPorts compatible environment manually.

The problem appears to be in line 199 of postflight.in:

USHELL=$(${DSCL} . -read /Users/${USER} shell | awk -F'/' '{print $NF}') || {

I believe this would solve the problem for me:

USHELL=$(${DSCL} /Search -read /Users/${USER} UserShell | awk -F'/' '{print $NF}') || {

Note that the key should also be changed to UserShell since the shell key isn't used in AD (at least in our environment).

The only problem with using the /Search node is that there is a possibility that it would return multiple UserShell values if the the user record exists in multiple nodes (local and Active Directory for example).

Change History (0)

Note: See TracTickets for help on using tickets.