Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCUMENT-777

Docs for managehome attribute of user resource conflict with expected functionality

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Done
    • Component/s: None
    • Labels:
    • Template:
    • CS Priority:
      Reviewed
    • QA Risk Assessment:
      Needs Assessment

      Description

      When a user already exists on the system the managehome attribute for the user resource does not create the homedir:

      Tested locally on same version and managehome =true/yes doesn't create the home dir.

      user {'john' :
        ensure     => present,
        managehome => yes,
        }
      user {'john' :
        ensure     => present,
        managehome => true,
        }
      

      The docs say that if ensure=present it should be created:
      "Whether to manage the home directory when managing the user. This will create the home directory when ensure => present"

      Puppet resource user <name> says homedir is present

      user { 'john':
        ensure           => 'present',
        gid              => 1002,
        home             => '/home/john',
        password         => '!!',
        password_max_age => 99999,
        password_min_age => 0,
        shell            => '/bin/bash',
        uid              => 1002,
      }
      [root@pe-201732-master home]# pwd
      /home
      [root@pe-201732-master home]# ls -al
      total 4
      drwxr-xr-x.  3 root    root      20 Mar  9  2016 .
      dr-xr-xr-x. 18 root    root    4096 Nov 15 16:23 ..
      drwx------   3 vagrant vagrant  107 Nov 28 13:34 vagrant
      [root@pe-201732-master home]#
      

      If puppet creates user from scratch it works but not for existing users.

      I raised this as a bug against Puppet Core and been informed it is expected behaviour so I believe the docs should be clearer on the behaviour. The doc is found here: https://puppet.com/docs/puppet/5.3/types/user.html#user-attribute-managehome

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              garrett.guillotte Garrett Guillotte
              Reporter:
              danny.mcilhagga Daniel Mcilhagga
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support