Defined Type: dokuwiki::user

Defined in:
manifests/user.pp

Summary

Creates local user in the users.auth.php file

Overview

dokuwiki::user

Creates local user in the users.auth.php file

Examples:

dokuwiki::user { 'admin':
  passwordhash => '$1$4fd0ad31$.cId7p1uxI4a.RcrH81On0',
  real_name    => 'admin',
  email        => 'root@localhost',
  groups       => ['user', 'admin'],
}

Parameters:

  • passwordhash (String) (defaults to: '')

    The password hash for the user. To generate the hash use the mkpasswd, which is part of the whois package. Generate the password using the following command: “‘ mkpasswd -m sha-512 -s <<< YourPass “`

  • real_name (String) (defaults to: '')

    The real name of the user, used to display the name of the user when pages are edit or created.

  • email (String) (defaults to: '')

    The e-mail address of the user.

  • groups (Array) (defaults to: [])

    The groups of the user.

  • login (String) (defaults to: $name)

    The username of the user to create, default to the $name parameter.



22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'manifests/user.pp', line 22

define dokuwiki::user(
  String $passwordhash = '',
  String $real_name = '',
  String $email = '',
  Array $groups = [],
  String $login = $name,
) {
  concat::fragment { "dokuwiki_user_${login}":
    target  => 'dokuwiki-users.auth.php',
    content => template('dokuwiki/user.erb'),
    order   => '10'
  }
}