On Oct 22, 4:21 pm, Jamie <gojamieg...@gmail.com> wrote:
> CentOS 5.3 w/ updates
> Puppet 0.25.1.rc2 (installed from source)
> Mongrel + Nginx
>
> Am I making a mistake or is this a bug? I've experienced this issue
> using 0.24.8 from EPEL also.
>
> Thu Oct 22 13:59:43 -0700 2009 //user::virtual-users_groups/User
> [someuser]/ensure (err): change from absent to present failed: Could
> not create user someuser: Execution of '/usr/sbin/useradd -G
> sshusers,someuser -d /home/someuser -u 4061 -s /bin/bash -c Some User -
> p $1$VezlG/$SSk0bJto9WNW4NRatiZJP1 -m someuser' returned 3: useradd:
> invalid numeric argument 'someuser'
>
> @user { "someuser":
> ensure => "present",
> uid => "4061",
> groups => [ someuser, sshusers ],
> comment => "Some User",
> home => "/home/someuser",
> shell => "/bin/bash",
> managehome => "true",
> password => '$1$VezlG/$SSk0bJto9WNW4NRatiZJP1',
> }
>
> class user::sshusers inherits user::virtual-users_groups {
> realize(
> Group["sshusers"],
> User["someuser"],
> )
>
> }
This is not a bug; it is a misuse of the User type's "groups"
property. If you read useradd's docs you will find that the groups
specified via the -g or -G argument must already be present on the
system. You will also see that the groups specified via -G are
*supplemental* groups, and that corresponds to the Puppet type
reference's constraint that the 'groups' property should not include
the user's primary group.
The first thing to do is remove "someuser" from the declared
supplemental groups. If you stop with that, then useradd will
probably do what you want. If you want to be more explicit, however,
then you need to declare the "someuser" group as a managed resource,
ensure that it gets applied before the "someuser" user (use the
"require" parameter), and specify it as the value of the user's "gid"
property.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com
To unsubscribe from this group, send email to
puppet-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en
-~----------~----~----~----~------~----~------~--~---