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

User resource unable to remove user's home directory when set to absent in AIX

    XMLWordPrintable

Details

    • Night's Watch
    • 2
    • NW - 2021-08-11, NW - 2021-08-25
    • Needs Assessment
    • 45117
    • 1
    • Bug Fix
    • Fix an issue where the user home directory was not removed when `managehome` was set to `true`.
    • Needs Assessment

    Description

      OS agent: AIX 7.1 or 7.2

      when using the following manifest with puppet apply to create finch user

      include add_user
      class add_user {
        # add user, create homedir and set a password
        user { 'finch':
          ensure     => 'present',
          comment    => 'H Finch',
          managehome => true,
          # note the single quotes to stop $ expanding
          password   => 'Pa$$w0rd',
          home       => '/home/finch',
        }
       
      }
      

      the user finch gets created along with its home folder as expected

      Then, if we use the following manifest to get rid of the same user

      include delete_user
      class delete_user{
       
       user { 'finch':
         ensure           => 'absent',
         managehome       => true,
         home             => '/home/finch',
       }
      }
      

      the user finch gets deleted but its home folder (/home/finch) is left behind.

      I have used the same code in centos7 and both user and home folder gets deleted at once as expected

      Desired Behavior:

      the code should work in the same manner independently of the OS platform - here AIX and centos

      Actual Behavior:

      code is not removing deleted user's home directory in AIX

      Attachments

        Issue Links

          Activity

            People

              dorin.pleava Dorin Pleava
              jordi.garcia Jordi Garcia
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Zendesk Support