Jira (PUP-9471) User management fails on MacOS 10.14 (Mojave)

24 views
Skip to first unread message

John Meyers (JIRA)

unread,
Feb 1, 2019, 1:53:03 PM2/1/19
to puppe...@googlegroups.com
John Meyers created an issue
 
Puppet / Bug PUP-9471
User management fails on MacOS 10.14 (Mojave)
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2019/02/01 10:52 AM
Priority: Normal Normal
Reporter: John Meyers
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

John Meyers (JIRA)

unread,
Feb 1, 2019, 2:03:05 PM2/1/19
to puppe...@googlegroups.com
John Meyers updated an issue
Change By: John Meyers
*Puppet Version: 4.10.6 and newer*
*Puppet Server Version: N/A*
*OS Name/Version: MacOS 10.14 (Mojave)*

Apple has introduced new security functions in MacOS 10.14 (Mojave) that break Puppet's ability to manage users.

To reproduce:

Apply a puppet file that creates a 'user' with a given password hash on MacOS 10.13.  Upgrade to MacOS 10.14.  Apply the same puppet file - it will work without issue.  Delete the user puppet created under 10.13 and re-apply the same puppet file to force Puppet to update the users data.  Puppet will fail with a plethora of "Operation not permitted @ rb_sysopen" errors.  Applying a 'TCC Profile' to the 10.14 system naming the Ruby interpreter used by Puppet does not help.

 

 

*Desired Behavior: Puppet should be able to manage users in MacOS 10.14.*

*Actual Behavior: Puppet fails to change user data in MacOS 10.14 with "Operation not permitted"*

 

 

Example:

user { 'test':
    ensure     => 'present',

    comment    => 'Test',

    gid        => '20',

    groups     => ['_appserveradm', '_appserverusr', '_lpadmin', 'admin'],

    home       => '/Users/test',

    iterations => '15898',

    password   => 'somepassword',

    salt       => 'somehash',

    shell      => '/bin/bash',

    uid        => '405',

    notify     => Exec['Hide sub-500 users'],

   }

 

puppet apply output:

Error: Operation not permitted @ rb_sysopen - /var/db/dslocal/nodes/Default/users/test.plist

Error: /Stage[main]/Main/Node[default]/User[test]/password: change from [old password hash redacted] to [new password hash redacted] failed: Operation not permitted @ rb_sysopen - /var/db/dslocal/nodes/Default/users/test.plist

Error: Operation not permitted @ rb_sysopen - /var/db/dslocal/nodes/Default/users/test.plist

Error: Operation not permitted @ rb_sysopen - /var/db/dslocal/nodes/Default/users/test.plist

Error: /Stage[main]/Main/Node[default]/User[test]/iterations: change from 58823 to 15898 failed: Operation not permitted @ rb_sysopen - /var/db/dslocal/nodes/Default/users/test.plist

John Meyers (JIRA)

unread,
Feb 1, 2019, 2:22:04 PM2/1/19
to puppe...@googlegroups.com

Rob Braden (JIRA)

unread,
Feb 4, 2019, 5:06:03 PM2/4/19
to puppe...@googlegroups.com
Rob Braden updated an issue
Change By: Rob Braden
Team: Platform OS

Geoff Nichols (JIRA)

unread,
Feb 6, 2019, 12:22:03 AM2/6/19
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Sprint: PR - Triage

Geoff Nichols (JIRA)

unread,
Feb 6, 2019, 12:22:03 AM2/6/19
to puppe...@googlegroups.com
Geoff Nichols updated an issue
Change By: Geoff Nichols
Team: Platform OS Puppet Romania

Mihai Buzgau (JIRA)

unread,
Feb 20, 2019, 5:41:09 AM2/20/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR - Triage 2019-03-06

Mihai Buzgau (JIRA)

unread,
Feb 20, 2019, 5:41:25 AM2/20/19
to puppe...@googlegroups.com

Octavian Larion (JIRA)

unread,
Feb 22, 2019, 8:26:03 AM2/22/19
to puppe...@googlegroups.com

Octavian Larion (JIRA)

unread,
Feb 27, 2019, 5:18:04 AM2/27/19
to puppe...@googlegroups.com
Octavian Larion commented on Bug PUP-9471
 
Re: User management fails on MacOS 10.14 (Mojave)

OSX 10.14 Mojave added a new security feature called “Full Disk Access” that limits the operations that a OSX user (including root) can do. You can find information about FDA here: https://macpaw.com/how-to/full-disk-access-mojave

 

Because of this feature, some of the Puppet functionality (for example changing a user’s home directory) does not work unless the puppet executable is whitelisted in FDA.

 

Whitelisting an app for FDA can be done in two official ways:

  1. Manual by the owner of the Macbook by clicking on the Apple icon > System Preferences > Go to Security & Privacy > Click on the privacy tab > Click Full Disk Access section in the side bar > Click on the “+” and add the path to the puppet executable: . Link: https://support.intego.com/hc/en-us/articles/360016683471-Enable-Full-Disk-Access-in-macOS-Mojave
  2. Automated using Privacy Preferences Control Profiles (PPCP) and a Mobile Device Management (MDM) Server.

 

We could try to “engineer” our Puppet Agent installer to whitelist the puppet app in FDA. DropBox has done something similar in the past and they had a lot of backlash from Apple and the community: https://www.reddit.com/r/apple/comments/51wy96/discovering_how_dropbox_hacks_your_mac/,[https://applehelpwriter.com/2016/08/29/discovering-how-dropbox-hacks-your-mac/]  

 

Without whitelisting puppet, we’ve got 2 Puppet tests that are failing. Both of them are related to changing a user’s home directory. We were able to validate that by whitelisting puppet the tests pass.

 

In my opinion the best way to handle this is to document the need to whitelist Puppet in FDA and specify that if it is not whitelisted some of the system calls might fail.

Thomas Kishel (JIRA)

unread,
Jul 16, 2019, 12:05:04 PM7/16/19
to puppe...@googlegroups.com
Thomas Kishel commented on Bug PUP-9471

Geoff Nichols

I don't think this is resolved, as Puppet, Inc. is currently suffering from the same issue.

I was unable to workaround this by whitelisting puppet
I had to whitelist Terminal

That should not resolve the issue when run via a LaunchDaemon
Adding launchd (if even possible) would be a security issue.

Also, we need to audit our other binaries, like (pxp-agent}}

Finally, we need to provide guidance on how to automate this (if even possible) at scale.
or document that it cannot be automated to save users frustration .
 

Geoff Nichols (JIRA)

unread,
Jul 16, 2019, 1:19:04 PM7/16/19
to puppe...@googlegroups.com

Mihai Buzgau (JIRA)

unread,
Jul 18, 2019, 3:58:02 AM7/18/19
to puppe...@googlegroups.com

Thomas Kishel (JIRA)

unread,
Jul 18, 2019, 2:05:04 PM7/18/19
to puppe...@googlegroups.com

Matt Cahill (JIRA)

unread,
Aug 8, 2019, 8:50:04 PM8/8/19
to puppe...@googlegroups.com
Matt Cahill commented on Bug PUP-9471

Hi,

I'd like to add a small piece of additional information in case it's of any use to whomever tackles this issue.

I have done extensive troubleshooting and ratified all of the tests carried out by Gerard Kok white-listing various via our Intune MDM server, none of which worked as he also found.

https://tickets.puppetlabs.com/browse/PUP-9502?focusedCommentId=635972&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-635972

The only way I can get puppet to run via launchd with full disk access that allows user management is by doing the following.

  1. Replace the link /opt/puppetlabs/bin/puppet with a shell script (the contents can be the same as the contents of /opt/puppetlabs/puppet/bin/wrapper.sh)
    OR
  2. rename /opt/puppetlabs/puppet/bin/wrapper.sh to /opt/puppetlabs/puppet/bin/wrapper and relink everything in /opt/puppetlabs/bin/puppet. Either way the important thing is that the script does not have a suffix.
  3. Give the path /opt/puppetlabs/bin/puppet Full Disk Access rights manually in System Preferences (not via MDM)

It seems that MDM full disk access rights are different from granting them in System Preferences. This of course means you would have to do this manually as an admin on every machine which for us is untenable.

Having this working via the MDM full disk access permission is very important for large fleets of puppet managed macs.

Mihai Buzgau (JIRA)

unread,
Sep 16, 2019, 6:04:05 AM9/16/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR - Triage, PR - 2019-03-06

Mihai Buzgau (JIRA)

unread,
Sep 16, 2019, 6:29:03 AM9/16/19
to puppe...@googlegroups.com
Mihai Buzgau assigned an issue to Unassigned
Change By: Mihai Buzgau
Assignee: Octavian Larion

Gheorghe Popescu (JIRA)

unread,
Sep 18, 2019, 4:21:03 AM9/18/19
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
Change By: Gheorghe Popescu
Sprint: PR - Triage, PR - 2019-03-06 , NW - 2019-10-02

Mihai Buzgau (JIRA)

unread,
Oct 2, 2019, 4:40:11 AM10/2/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR - 2019-03-06, NW - 2019-10-02 , NW - 2019-10-16

Mihai Buzgau (JIRA)

unread,
Oct 16, 2019, 4:24:10 AM10/16/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR - 2019-03-06, NW - 2019-10-02, NW - 2019-10-16 , NW - 2019-10-30

Mihai Buzgau (JIRA)

unread,
Oct 30, 2019, 5:00:13 AM10/30/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR - 2019-03-06, NW - 2019-10-02, NW - 2019-10-16, NW - 2019-10-30 , NW - 2019-11-13

Mihai Buzgau (JIRA)

unread,
Nov 14, 2019, 5:28:07 AM11/14/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR - 2019-03-06, NW - 2019-10-02, NW - 2019-10-16, NW - 2019-10-30, NW - 2019-11-13 , 2019-11-27

Mihai Buzgau (JIRA)

unread,
Nov 27, 2019, 4:51:10 AM11/27/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR - 2019-03-06, NW - 2019-10-02, NW - 2019-10-16, NW - 2019-10-30, NW - 2019-11-13, 2019-11-27 , 2019-12-11

Mihai Buzgau (JIRA)

unread,
Dec 11, 2019, 4:34:05 AM12/11/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: PR - 2019-03-06, NW - 2019-10-02, NW - 2019-10-16, NW - 2019-10-30, NW - 2019-11-13, 2019-11-27, 2019-12-11 , 2019-12-24

Jean Bond (JIRA)

unread,
Dec 11, 2019, 5:37:04 PM12/11/19
to puppe...@googlegroups.com
Jean Bond commented on Bug PUP-9471
 
Re: User management fails on MacOS 10.14 (Mojave)

Thanks Gabriel Nagy!

Docs, I think this should go in a couple of places:

Reply all
Reply to author
Forward
0 new messages