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

Creating a user resource can result in incorrect UIDs on the users home folder

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Incomplete
    • Affects Version/s: PUP 3.7.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:

      Description

      Hard to explain concisely. These steps result in an /etc/passwd file that has a user of one UID, and a home folder with a different UID.

      Steps:
      1. puppet resource user joe ensure=present managehome=true
      2. puppet resource user beagle ensure=present managehome=true
      3. puppet resource user joe ensure=absent
      – Note that this command doesn't have managehome=true
      4. puppet resource user joe ensure=present managehome=true

      /etc/passwd contains:

      beagle:x:535:535::/home/beagle:/bin/bash
      joe:x:536:536::/home/joe:/bin/bash
      

      {{stat}}ing the home folders shows a different UID:

      [root@ipidgw0qia7c3m6 ~]# stat /home/joe
        File: `/home/joe'
        Size: 4096      	Blocks: 8          IO Block: 4096   directory
      Device: fd00h/64768d	Inode: 140558      Links: 2
      Access: (0700/drwx------)  Uid: (  534/ UNKNOWN)   Gid: (  534/ UNKNOWN)
      

      The only practical consequence I've found for this so far is that trying to create an ssh_authorized_key resource for user joe after these steps fails, saying it can't find a user for UID 334. It appears to be looking at the home folder for the UID, which now disagrees with the {{/etc/passwd} file.

      Running puppet resource user joe correctly reports UID 336, in agreement with /etc/passwd

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            joe.pinsonault Joe Pinsonault
            QA Contact:
            Joe Pinsonault
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Zendesk Support