file { "/home/clavis":
ensure => "directory",
owner => "clavis",
group => "clavis",
mode => 700,
require => [ User[clavis], Group[clavis] ],
}
group { 'clavis':
ensure => "present",
}
user { "clavis":
ensure => "present",
home => "/home/clavis",
name => "clavis",
shell => "/bin/bash",
managehome => true,
# groups => 'clavis', <--- This is the problem remove it and this will work
}
I think you are confusing the user's primary group with additional groups
From
http://docs.puppetlabs.com/references/latest/type.html#user :
gid:
The user’s primary group. Can be specified numerically or by name. Note that users on Windows systems do not have a primary group; manage groups with the groups attribute instead.
groups:
The groups to which the user belongs. The primary group should not be listed, and groups should be identified by name rather than by GID. Multiple groups should be specified as an array.
From
http://www.computerhope.com/unix/useradd.htm :
-g initial_group
The group name or number of the user's initial login group. The group name must exist. A group number must refer to an already existing group. The default group number is 1.
-G group,[,...]
A list of supplementary groups which the user is also a member of. Each group is separated from the next by a comma, with no intervening whitespace. The groups are subject to the same restrictions as the group given with the -g option. The default is for the user to belong only to the initial group.
“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
puppet-users...@googlegroups.com.