Ask Your Question

create a system user

asked 2015-11-10 01:44:38 -0600

473183469 gravatar image

I would like to create a user with a uid in the dynamic system range (on Debian it is 100-999).

I am aware I can create a user without specifying the uid: puppet would use the first unused uid in the user range (1000 and over).

But this time I am creating a system user and I would like the uid could fit the debian-policy

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-11-10 09:28:28 -0600

csharpsteen gravatar image

Set system => true when creating the group. When this attribute isn't set, puppet creates groups that have gids greater than 1000:

# facter osfamily

# puppet resource group foo ensure=present
Notice: /Group[foo]/ensure: created
group { 'foo':
  ensure => 'present',

# puppet resource group foo
group { 'foo':
  ensure => 'present',
  gid    => '1001',

When system is set to true, Puppet will create groups with gid values less than 1000:

# puppet resource group bar ensure=present system=true
Notice: /Group[bar]/ensure: created
group { 'bar':
  ensure => 'present',

# puppet resource group bar
group { 'bar':
  ensure => 'present',
  gid    => '998',

More information on attributes, like system, can be found in the Resource Type Reference.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-11-10 01:44:38 -0600

Seen: 1,294 times

Last updated: Nov 10 '15