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

User project on Solaris is never set

    XMLWordPrintable

Details

    Description

      When setting the project attribute on a user type in Solaris 11.2 or 11.3, the incorrect option (-p X) is used in useradd and usermod commands. It should be using -K project=X to set it as a user attribute. Once this is done manually, reading the project value back out works fine. It's just writing that is wrong.

      We use Puppet 3.6.2 but have also tested in 3.8.7 and 4.5.3.

      root@solaris:/tmp# puppet resource user vagrant project=group.staff
      Notice: /User[vagrant]/project: project changed '' to 'group.staff'
      user { 'vagrant':
        ensure => 'present',
      }
       
      root@solaris:/tmp# puppet resource user vagrant project=group.staff
      Notice: /User[vagrant]/project: project changed '' to 'group.staff'
      user { 'vagrant':
        ensure => 'present',
      }
       
      root@solaris:/tmp# usermod -Kproject=group.staff vagrant
      UX: usermod: vagrant is currently logged in, some changes may not take effect until next login.
       
      root@solaris:/tmp# puppet resource user vagrant project=group.staff
      user { 'vagrant':
        ensure  => 'present',
        project => 'group.staff',
      }
      

      Adding --debug shows it executing the incorrect command

      Debug: Executing: '/usr/sbin/usermod -p group.staff vagrant'

      Attachments

        Activity

          People

            Unassigned Unassigned
            nickh Nick Howes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Zendesk Support