[CentOS] PUPPET - group IDS

Wed Apr 19 21:20:08 UTC 2017
Paul Heinlein <heinlein at madboa.com>

On Wed, 19 Apr 2017, Ian Diddams wrote:

> hope thus comes under the remit of this mailking list...
>
>
>
> We use puppet, and Im trying to come up with "code" that will create two user accounts with a shared groiup ID
> eg 
> user1 with UID 1000user 2 with UID 1001
> but I would like them BOTH to share the GID of 2000
> I've tried the following
> accounts::groups:    jointgroup:        gid: '2000'
> accounts::users:
>     user1:        uid: '1000'        gid: '2000'        home: '/home/user1'        shell: '/bin/bash'        password: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
>     user2:        uid: '1001'        gid: '200'        home: '/home/user2'        shell: '/bin/bash'        password: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
> But when I trfy and use this puppet agent -tv complains when trying to create user2 that GID 2000 is slready used .
>
> how may I manage this?

I haven't used the "allowdupe" option, so I don't know if it works for 
GIDs, but supposedly this works:

   user { 'user1':
     uid => 1000, gid => 2000, ...,
     allowdupe => true
   }

   user { 'user2':
     uid => 1001, gid => 2000, ...,
     allowdupe => true
   }

In YAML-ese, I guess you'd just add

accounts::users:
   user1:
     allowdupe: 'true'

-- 
Paul Heinlein <> heinlein at madboa.com <> http://www.madboa.com/