Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-8897

check_manage_home useradd provider needs to add -M on Debian

    XMLWordPrintable

Details

    • Bug Fix
    • Fixed an issue where Puppet would not add the correct command flags when ensuring a `user` resource with `managehome` enabled
    • Needs Assessment

    Description

      Regarding the code here:

      https://github.com/puppetlabs/puppet/blob/1c77bfb8961587ddf5399cd4a70fc908cac6a6ec/lib/puppet/provider/user/useradd.rb#L127-L135

      There is an edge case that is missed. If force_local is true and manage_home is false, then "-M" should be added as a command line argument on Debian Jessie (and possibly others).

      If this is not in place, a bug occurs as follows when running on Debian Jessie (and possibly others). First manually create `/home/bob` (like pam_mkhomedir might do) and then try to add `bob` with a resource like this, and it will fail:

      user { 'bob':
       
        force_local => true,
       
        manage_home => false,
       
        ... Other Params ...
       
      }
      

      Attachments

        Activity

          People

            gabriel.nagy Gabriel Nagy
            kpaulisse Kevin Paulisse
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support