Hello, I have problem with creating user under centos: part of my class: user {jboss: ensure => present, home => "$jboss_home", shell => "/bin/bash", groups => jboss, } and in log I see: err change from absent to present failed: Could not create user jboss: Execution of ''/usr/sbin/useradd -d /opt/jboss -G jboss -s /bin/ bash -M jboss'' returned 9: useradd: group jboss exists - if you want to add this user to that group, use -g. I understand reason of problem. Flag "-M" should not be before username. But I did not understand how I can fix it. -- 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.
Sorry. Problem realy only in Upper -G. By-hand with -g work fine! On 17 ноя, 15:00, Leonko <the.leo...@gmail.com> wrote:> Hello, I have problem with creating user under centos: > > part of my class: > > user {jboss: > ensure => present, > home => "$jboss_home", > shell => "/bin/bash", > groups => jboss, > } > and in log I see: > > err change from absent to present failed: Could not create user > jboss: Execution of ''/usr/sbin/useradd -d /opt/jboss -G jboss -s /bin/ > bash -M jboss'' returned 9: useradd: group jboss exists - if you want > to add this user to that group, use -g. > > I understand reason of problem. Flag "-M" should not be before > username. But I did not understand how I can fix it.-- 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.
On Wed, Nov 17, 2010 at 4:00 AM, Leonko <the.leonko@gmail.com> wrote:> Hello, I have problem with creating user under centos: > > part of my class: > > user {jboss: > ensure => present, > home => "$jboss_home", > shell => "/bin/bash", > groups => jboss, > }If it''s the primary group use gid instead of groups. user {jboss: ensure => present, home => "$jboss_home", shell => "/bin/bash", gid => jboss, } Thanks, Nan -- 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.
On 11/17/2010 07:01 PM, Nan Liu wrote:> On Wed, Nov 17, 2010 at 4:00 AM, Leonko <the.leonko@gmail.com> wrote: >> Hello, I have problem with creating user under centos: >> >> part of my class: >> >> user {jboss: >> ensure => present, >> home => "$jboss_home", >> shell => "/bin/bash", >> groups => jboss, >> } > > If it''s the primary group use gid instead of groups....or "group" rather than "groups" (plural!). groups = -G (and takes an array) group = -g Cheers, Felix -- 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.
Thank you. It real help for me/ now I use user { $username: ensure => present, home => "$home/$username", shell => "/bin/bash", gid => $username, groups => [''wheel'',''users''], comment => "$uname", password => "$hash"; } Sorry for late reply. On Nov 17, 9:01 pm, Nan Liu <n...@puppetlabs.com> wrote:> On Wed, Nov 17, 2010 at 4:00 AM, Leonko <the.leo...@gmail.com> wrote: > > Hello, I have problem with creating user under centos: > > > part of my class: > > > user {jboss: > > ensure => present, > > home => "$jboss_home", > > shell => "/bin/bash", > > groups => jboss, > > } > > If it''s the primary group use gid instead of groups. > > user {jboss: > ensure => present, > home => "$jboss_home", > shell => "/bin/bash", > gid => jboss, > } > > Thanks, > > Nan-- 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.
Thank you! Thank you! I did not knew what is important. On Nov 19, 9:28 pm, Felix Frank <felix.fr...@alumni.tu-berlin.de> wrote:> On 11/17/2010 07:01 PM, Nan Liu wrote: > > > On Wed, Nov 17, 2010 at 4:00 AM, Leonko <the.leo...@gmail.com> wrote: > >> Hello, I have problem with creating user under centos: > > >> part of my class: > > >> user {jboss: > >> ensure => present, > >> home => "$jboss_home", > >> shell => "/bin/bash", > >> groups => jboss, > >> } > > > If it''s the primary group use gid instead of groups. > > ...or "group" rather than "groups" (plural!). > > groups = -G (and takes an array) > group = -g > > Cheers, > Felix-- 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.