The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Feature #2645

Support "-r" option to useradd (create a system user)

Added by Robin Bowes about 6 years ago. Updated over 2 years ago.

Status:ClosedStart date:09/16/2009
Priority:NormalDue date:
Assignee:Nigel Kersten% Done:


Target version:2.6.7
Affected Puppet version:0.24.8 Branch:
Keywords: customer

We've Moved!

Ticket tracking is now hosted in JIRA:


Red Hat have added a -r option to useradd:

   -r This flag is used to create a system account. That is, a user with a
      UID lower than the value of UID_MIN defined in /etc/login.defs and
      whose password does not expire. Note that useradd will not create a
      home directory for such an user, regardless of the default setting in
      /etc/login.defs. You have to specify -m option if you want a home
      directory for a system account to be created. This is an option added
      by Red Hat

I’d like to have support for this in puppet.

Related issues

Related to Puppet - Feature #5726: Allow uid range when creating a user Needs More Information 12/30/2010


#1 Updated by Luke Kanies about 6 years ago

  • Category set to user
  • Status changed from Unreviewed to Needs Decision

How would you envision specifying that a system user should be created?

#2 Updated by Robin Bowes about 6 years ago

By adding a new parameter to the appropriate provider

system => true|false

(default: false)

#3 Updated by David Pashley almost 6 years ago

In Debian and Ubuntu, you would use the —system option to adduser. This saves the problem where normal users are defined in an external database like LDAP and puppet-created users might end up conflicting.

#4 Updated by Luke Kanies almost 6 years ago

  • Status changed from Needs Decision to Accepted

#5 Updated by Patrick Mohr almost 6 years ago

I’m having a related problem. On ubuntu, when I create a user, the home directory isn’t created. Is it likely that when this fix is done, the home directory will be created if the user isn’t a system user? If so, should the default be system user since that’s what user’s current meant for anyway?

I know the fix probably won’t get to me any time soon because I only use packages in ubuntu-stable. I plan to use exec “adduser $username”: as a workaround.

#6 Updated by Kenny Gryp over 5 years ago

We’re having issues as well. We’re forcing some userids (real persons), but for system users, we just define them in puppet without specifying a userid.

As workaround we now need a way to make sure the system users are created first or last, because our real users userid is have adjacent userids. Now when puppet mixes those, real users cannot be added because another user took that userid. One simple way I figured out already is adding a user with a very high uid, higher than the one’s we’ll be allocating, so that when a new uid is picked, it’s not conflicting.

#7 Updated by James Turnbull over 4 years ago

  • Status changed from Accepted to Needs Decision
  • Assignee set to Nigel Kersten

#8 Updated by James Turnbull over 4 years ago

  • Status changed from Needs Decision to In Topic Branch Pending Review
  • Target version set to 2.6.x
  • Branch set to

Patch created and sent to -dev list.

#9 Updated by James Turnbull over 4 years ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release

#10 Updated by James Turnbull over 4 years ago

  • Status changed from Merged - Pending Release to Closed
  • Target version changed from 2.6.x to 2.6.7

#11 Updated by Charlie Sharpsteen over 2 years ago

  • Keywords set to customer

Also available in: Atom PDF