pycreateuserpkg icon indicating copy to clipboard operation
pycreateuserpkg copied to clipboard

user pkgs possibly not working with upcoming macOS BS b8

Open MiqViq opened this issue 5 years ago • 3 comments

Seems that packages created with pycreateuser are not creating user acccounts. At least I cannot get them working on the latest beta 8. Using script with sysadminctl -addUser works ok.

MiqViq avatar Sep 24 '20 13:09 MiqViq

Seems to work here, though maybe opendirectoryd needs a kick:

We're running Big Sur Beta 8, and the "test" user does not exist:

# sw_vers
ProductName:	macOS
ProductVersion:	11.0
BuildVersion:	20A5374i
# id test
id: test: no such user

Now install a package that should create a "test" user:

# installer -pkg /Users/Shared/testuser.pkg -target /
installer: Package name is testuser
installer: Installing at base path /
installer: The install was successful.

Is the user there now?

# id test
id: test: no such user

Hmm, let's check dscl:

# dscl . read /Users/test
dsAttrTypeNative:_writers_hint: test
dsAttrTypeNative:_writers_jpegphoto: test
dsAttrTypeNative:_writers_passwd: test
dsAttrTypeNative:_writers_picture: test
dsAttrTypeNative:_writers_realname: test
dsAttrTypeNative:_writers_UserCertificate: test
dsAttrTypeNative:accountPolicyData:
 <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>creationTime</key>
	<real>1600959859.0521779</real>
</dict>
</plist>

dsAttrTypeNative:record_daemon_version: 8000000
dsAttrTypeNative:ShadowHashData:
 62706c69 73743030 d101025f 10145341 4c544544 2d534841 3531322d 50424b44 4632d303 04050607 08547361 6c745765 6e74726f 70795a69 74657261 74696f6e 734f1020 546a4683 15e4b019 21087133 d3673c50 e04cff4c aebc9b0f 159bef48 a13fae85 4f1080dd d1327295 ba229bce 4c9c2807 55e681ee 4b23e088 15692a7b a088f5db d235265a ae372c91 cfb92032 45d9f34f 352dedc7 6089377a 08f1bf89 7c8b10a4 1d1a2981 ff99e172 dbfe6154 a51a67a3 f75f54e0 b46242b4 51b99163 d236b2be dcde9dce 30cdf1b8 b4619598 e34aa4bc 22da1f35 85b7e68a bd1c5849 a2003632 0ab81311 c0d0080b 22292e36 4164e700 00000000 00010100 00000000 00000900 00000000 00000000 00000000 0000ea
AppleMetaNodeLocation: /Local/Default
AuthenticationAuthority: ;ShadowHash;HASHLIST:<SALTED-SHA512-PBKDF2>
GeneratedUID: DDB11F83-5D4F-49CD-9F8C-8272055D6B08
NFSHomeDirectory: /Users/test
Password: ********
PrimaryGroupID: 20
RealName: test
RecordName: test
RecordType: dsRecTypeStandard:Users
UniqueID: 999
UserShell: /bin/bash

That's the account the package was expected to create. Let's restart the directory services, and try id again:

# killall opendirectoryd
# id test
uid=999(test) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),98(_lpadmin),100(_lpoperator)

Looks OK...

gregneagle avatar Sep 24 '20 15:09 gregneagle

I am not able to get it work either on Big Sur. User is created in Directory Utility but is missing some information. Can't sign in nor can I authenticate with it as admin. Not sure what is wrong, but numerous people on Mac Admins Slack saying they are having issues as well. Will keep digging.

BayonIT avatar Dec 23 '20 01:12 BayonIT

False alarm, I spent time some rebuilding the package last night and got it to work. I just assumed it may not because many people were commenting they rebuilt it and was having issues.

BayonIT avatar Dec 23 '20 14:12 BayonIT