I have a definition like this in one of my manifests: group { ''foo'': ensure => present, } user { ''bar'': ensure => present, groups => [''foo''], managehome => true, home => ''/home/bar'', shell => ''/usr/sbin/nologin'', require => Group[''deploy''], } When I run it, however, I get this error: err: /Stage[main]/App-server/User[deploy]/ensure: change from absent to present failed: Could not create user deploy: Execution of ''/usr/sbin/useradd -d /home/deploy -G deploy -s /usr/sbin/nologin -m deploy'' returned 9: useradd: group deploy exists - if you want to add this user to that group, use -g. What can I do to fix this? I don''t always want to assign the user to that group as its primary? —Oliver -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/1inCE1-KAQgJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
(I should point out, the user was called deploy in the actual manifest :-) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/gxCVq9pmJi0J. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hi, On Jul 22, 2011, at 2:31 PM, Oliver Beattie wrote:> I have a definition like this in one of my manifests: > > group { ''foo'': > ensure => present, > } > > user { ''bar'': > ensure => present, > groups => [''foo''], > managehome => true, > home => ''/home/bar'', > shell => ''/usr/sbin/nologin'', > require => Group[''deploy''], > } > > When I run it, however, I get this error: > > err: /Stage[main]/App-server/User[deploy]/ensure: change from absent to present failed: Could not create user deploy: Execution of ''/usr/sbin/useradd -d /home/deploy -G deploy -s /usr/sbin/nologin -m deploy'' returned 9: useradd: group deploy exists - if you want to add this user to that group, use -g. > > What can I do to fix this? I don''t always want to assign the user to that group as its primary?Is this a Debian system? On Debian the user add command automatically adds a primary group with the same name as the username. What happens when you run the useradd command directly? Kind regards, Martin -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Hi, Yes, this is Debian (Ubuntu). If I specify groups (not gid) surely the groups the user gets added to should be secondary, not primary? If I run the command directly I get the same error (although not if I lowercase the g of course). —Oliver -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/M_HplM5p9loJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Jul 22, 2011, at 4:23 PM, Oliver Beattie wrote:> Hi, > > Yes, this is Debian (Ubuntu). If I specify groups (not gid) surely the groups the user gets added to should be secondary, not primary? > > If I run the command directly I get the same error (although not if I lowercase the g of course).OK. I assume you need to give the gid parameter for primary group to your manifest.> > —Oliver > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/M_HplM5p9loJ. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.-- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.