Files
Controls-docs/admin-guide/puppet/profiles/local_accounts.rst
T
2021-05-05 14:24:27 +02:00

2.3 KiB

profile::local_accounts

This module helps managing local users and groups.

Parameters

Name Type Default
group_defs hash hiera('local_accounts::group_defs')
groups hash hiera('local_accounts::groups')
user_defs hash hiera('local_accounts::user_defs')
users list hiera('local_accounts:users')

group_defs

A hash containing the definitions of local groups. The keys are the group names, the values are the numeric group IDs.

Example:

local_accounts::group_defs:
  'my_local_group': 673

Also see groups.

groups

A list containing the names of the local groups to be created. The definition for each group is taken from group_defs.

user_defs

A hash containing the definitions of local users. The keys are the user names, the values are hashes containing the usual user properties, ie:

password password hash (optional)
uid numeric UID (required)
gid numeric GID (required)
comment comment (optional)
home home directory (required)
shell shell (required)

users

A list of the users to be created. The definition of each user is taken from user_defs.

Examples

The following defines three users and one group, but only creates one each:

local_accounts::group_defs:
  'archadm': 503

local_accounts::user_defs:
  'ioc':
    'uid': 500
    'gid': 9102
    'home': '/home/ioc'
    'shell': '/bin/bash'
    'comment': 'IOC Account'

  'slsop':
    'uid': 501
    'gid': 9102
    'home': '/home/slsop'
    'shell': '/bin/bash'
    'comment': 'SLS Operator'

  'archadm':
    'uid': 503
    'gid': 503
    'home': '/home/archadm'
    'shell': '/bin/bash'
    'comment': ''

local_accounts::groups:
  - 'archadm'

local_accounts::users::
  - 'archadm'