[MacPorts] #61320: MacPorts-2.6.3-10.15-Catalina.pkg installer error

MacPorts noreply at macports.org
Thu Oct 15 18:29:30 UTC 2020


#61320: MacPorts-2.6.3-10.15-Catalina.pkg installer error
--------------------------+--------------------
  Reporter:  pierswalter  |      Owner:  (none)
      Type:  defect       |     Status:  new
  Priority:  Normal       |  Milestone:
 Component:  base         |    Version:  2.6.3
Resolution:               |   Keywords:
      Port:               |
--------------------------+--------------------

Comment (by pierswalter):

 Ok, I've researched this a bit now.

 On this host, my account is not a local account:\\
 `> dscl . -read /Users/piers`\\
 `<dscl_cmd> DS Error: -14136 (eDSRecordNotFound)`

 These are the search paths that are set up in Directory Services:\\
 `> dscl /Search -read / CSPSearchPath`\\
 `CSPSearchPath:`\\
 ` /Local/Default`\\
 ` /Active Directory/ILINK/All Domains`

 I can read my user data from the Active Directory datasource:\\
 `> dscl "/Active Directory/ILINK/All Domains" -read /Users/piers | wc
 -l`\\
 ``\\
 `     224`

 Or by using `/Search` as the datasource (this searches through all
 configured datasources in order):\\
 `> dscl /Search -read /Users/piers | wc -l`\\
 ``\\
 `     224`

 I think that it might be advisable to modify the postinstall script by
 replacing the datasource specification `.` by `/Search`, as in:\\
 `dscl /Search -read /Users/piers shell `

 This would make the command work in more cases than it does now.

 However, in my case there seems to be an additional problem.\\
 It turns out that the account information from Active Directory uses the
 key `UserShell` instead of `shell`:\\
 `> dscl /Search -read /Users/piers shell`\\
 ``\\
 `No such key: shell`\\
 `> dscl /Search -read /Users/piers UserShell`\\
 `UserShell: /bin/zsh`

 I do not know if use of the key `UserShell` is a standard feature of
 Active Directory or if this is some sort of local peculiarity in our
 server. Upon a cursory glance I did not find an obvious way how to change
 the key with which the user shell is being reported.

 Anyhow, should use of the key `UserShell` be a standard feature of Active
 Directory, then I think that it might be advisable to modify the
 postinstall script even further by searching for `UserShell` in a second
 call whenever the search for `shell` did not result in a result.

 If one or both of my suggestions are being welcomed and if this would
 help, I'd gladly offer to give it a try and offer a pull request.
 This may take a while though, as I haven't had the chance to look at the
 MacPorts sources before...

-- 
Ticket URL: <https://trac.macports.org/ticket/61320#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list