This was a known problem with earlier puppet releases where adding local
users would fail if they existed in a network name service (LDAP, NIS,
etc), so more recent 3.x puppet versions of the user resource have a
'forcelocal' option. Use this, and it will work.
On Wednesday, February 26, 2014 4:17:05 PM UTC-6, bluethundr wrote:
>
> Hey all,
>
> I've created a puppet module to control LDAP in my environment. The ldap
> packages on both the centos and ubuntu hosts seem to require a user and
> group called 'ldap' (respectively).
>
> in my ldap::install class I have the following defined:
>
> user { "ldap":
> ensure => present,
> }
>
> group { "ldap":
> ensure => present, }
>
>
> But on each puppet run after the user and group is created the following
> error occurs:
>
> err: /Stage[main]/Ldap::Install/User[ldap]/ensure: change from absent to
> present failed: Could not create user ldap: Execution of '/usr/sbin/usera
> dd -M ldap' returned 9: useradd: group ldap exists - if you want to add
> this user to that group, use -g.
>
> Is there any way to achieve being able to create this user and group and
> avoid the error on each run thereafter?
>
> Thanks
> Tim
>
> --
> GPG me!!
>
> gpg --keyserver pool.sks-keyservers.net --recv-keys F186197B
>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/puppet-users/80becae8-c0bb-4287-98f7-c7984037f050%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.