Forge Home


Puppet module to manage users, groups, and ssh keys.

Jason Murray



7,876 latest version

4.9 quality score

Version information

  • 1.0.2 (latest)
  • 1.0.1
  • 1.0.0
  • 0.0.6
  • 0.0.5
  • 0.0.4
  • 0.0.3
  • 0.0.2
  • 0.0.1
released Oct 31st 2015
This version is compatible with:
  • RedHat

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'duxklr-manageusers', '1.0.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add duxklr-manageusers
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install duxklr-manageusers --version 1.0.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Tags: ssh, users, groups


duxklr/manageusers — version 1.0.2 Oct 31st 2015


Table of Contents

  1. Overview
  2. Description
  3. Installation
  4. Usage
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module


Puppet module to manage users, groups, and ssh keys on a group of systems that all share a common user base.


This module is designed to be a simple system to manage a common set of usernames, UIDs, GIDs, passwords, groups and ssh keys across common set of servers. The primary motivations behind this module are:

  • Single point of account management
  • No single point of failure like some SSO systems may introduce
  • user, group(s), and ssh keys are ALL required for account creation
  • Simple syntax that is easy to learn and easy to use
  • No external module dependencies


Copy the module into your /etc/puppet/modules directory.

Using Puppet (Native Command)

puppet module install duxklr-manageusers

Using GIT

cd /etc/puppet/modules
git clone


All user account configuration is stored in one of two files. The entire system is then called from the main site.pp. Examples:

Adding Users

Edit the /pathToPuppetConfig/modules/manageusers/manifests/add_accounts.pp to add user accounts (similar to this):

# Example adding an account to all systems
manageusers::create_account { user1:
    realname   => "John Smith",
    uid        => "700",
    password   => '$1$abcedfghijklmnopqrstuvwxyz',
    shell      => "/bin/bash",
    groups     => ['sudo', 'user1'],
    sshkeytype => "ssh-dss",
    sshkey     => "AAAAB3NzaC1kc3MAAACBAJzMVL4afDQBJ3rcM9LlHqxg0rmkWDwoWehS4nIpBLJL9qGoyR1YBzPvpD1VufsUqgUXH9dYdfaiVum4IaTgyu2Tb0ezR4Nx2Jkcnp+8jFh/Cys3zgMvzJaIw/Au45E9h4vBdwvouj1Sg0YaY5mGuKZ2w121uPLawjc3DJsNSc+jAAAAFQCb7+Vtir8w+o/CIDiSPXr6MVj16QAAAIBFHMnBixvQax1ekLK70eR9TgYUAXsh0MHT8VT+XMUWlOC8u8yVEOTDzrU1ZL2vNWo4NZL6ex9ffx0JRS5hSCU/o8aVcoC4viCC7SGmntNb0nQo+iKUyTQbGcmMoPG9lO498prML66GbOYWzTedc4XT683kyWV4k0iVixyvLsfLnAAAAIB4PmZfjdTtYwC7cE/upvfC/HWpKHHAn66YW6PRTCwZPqCd2AvHAMX/l7nbk1u+BL0YtymawzNT97FcYuvM1UWrJ+fT8iIsTyHsoUkf76irVxcTBH0SReChHbYeWa2bATEvaj0u2597H4O7qYHJ6IZpTTAeWP0EeKDABfonAr+ZJw=="

## Example adding an account to a single system
if $fqdn == "" {
  manageusers::create_account { user8:
    realname   => "Single System",
    uid        => "708",
    password   => '$1$abcedfghijklmnopqrstuvwxyz',
    shell      => "/bin/bash",
    groups     => ['sudo', 'user8'],
    sshkeytype => "ssh-dss",
    sshkey     => "MyKeyWouldGoHere"

Removing Users

Edit the /pathToPuppetConfig/modules/manageusers/manifests/remove_accounts.pp to remove user accounts (similar to this):

user { user3:
    ensure => "absent"

Main Call

Once the user information is added. Call the main system.

Edit the /pathToPuppetConfig/manifests/site.pp and call the manageusers module (similar to this):

node 'default' {
  include manageusers


Tested and known to work with Ubuntu (10.x, 12.x, 14.x) and RedHat (5.x, 6.x).


Comments, suggestions, and code can be found here: