Forge Home

local_user

Manage local users, setting an initial password and letting the user manage it as needed afterward.

28,910 downloads

8,520 latest version

4.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 2.0.3 (latest)
  • 2.0.1
  • 2.0.0-rc0 (deleted)
  • 1.0.8
  • 1.0.7
  • 1.0.6
  • 1.0.5
  • 1.0.4
  • 1.0.3
  • 1.0.2
  • 1.0.1
  • 1.0.0
  • 0.9.4
  • 0.9.3
  • 0.9.2
  • 0.9.0
released May 23rd 2015
This version is compatible with:
  • , ,

Start using this module

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

Add this module to your Puppetfile:

mod 'rnelson0-local_user', '0.9.4'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add rnelson0-local_user
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install rnelson0-local_user --version 0.9.4

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.

Download

Documentation

rnelson0/local_user — version 0.9.4 May 23rd 2015

local_user

Table of Contents

  1. Overview
  2. Usage - Configuration options and additional functionality

Overview

This module provides a defined type, local_user, that wraps the puppet 'user' resource type with validation. You may also provide a initial password that is set only when the user has no password, as a brand new 'user' resource puppet creates will have. This allows users to maintain their own passwords after creation.

Usage

Create a local user by providing at a minimum the user name, state, comment, groups, and initial password:

local_user { 'username':
  state            => 'present',
  comment          => 'Real Name',
  groups           => ['group1', 'group2'],
  password         => 'encryptedstring',
}

You may also provide the shell, home directory, password max age, and the last change date (YYYY-MM-DD or number of days since Jan 1, 1970). These values default to /bin/bash, /home/, 90 days, and 0 days, respectively.

local_user { 'username':
  state            => 'present',
  shell            => '/bin/bash',
  home             => '/home/username',
  comment          => 'Real Name',
  groups           => ['group1', 'group2'],
  last_change      => '2015-01-01',
  password         => 'encryptedstring',
  password_max_age => 90,
}

Note: The encrypted string is processed via sed using '/' seperators. You MUST escape any '/' characters.