I read that this doesn''t always work on every OS. However, I''m on RHEL, and from what I''m reading the following should correctly set / etc/shadow: @user { "myuser": require => Group[''staff''], ensure => present, uid => ''2345'', gid => ''90'', shell => ''/bin/bash'', comment => ''myuser'', home => ''/home/myuser'', managehome => true, password => "$1$BfhBSUJv$ajfjgfhdskdgfljkfdglkjfdlkfd.", # fake hash for this post } It creates the user and dependency, but doesn''t touch /etc/shadow. I need to be able to set this hash with the virtual user for the systems we manage. Is there some workaround for this, or is my syntax incorrect? -- 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.
Dominik Zyla
2012-Mar-07 01:11 UTC
Re: [Puppet Users] Setting password hash for virtual users?
On Wednesday, 7 March 2012 at 01:38, Forrie wrote:> I read that this doesn''t always work on every OS. However, I''m on > RHEL, and from what I''m reading the following should correctly set / > etc/shadow: > > > @user { "myuser": > require => Group[''staff''], > ensure => present, > uid => ''2345'', > gid => ''90'', > shell => ''/bin/bash'', > comment => ''myuser'', > home => ''/home/myuser'', > managehome => true, > password => "$1$BfhBSUJv$ajfjgfhdskdgfljkfdglkjfdlkfd.", # > fake hash for this post > } > > > It creates the user and dependency, but doesn''t touch /etc/shadow. > > I need to be able to set this hash with the virtual user for the > systems we manage. Is there some workaround for this, or is my > syntax incorrect?Hi, Why did you use `@file'' definition instead of `file''? `@file'' only creates virtual resource which will not change anything in your system until you refer to it using `<||>'' notation. This link should clarify you this topic: http://docs.puppetlabs.com/guides/virtual_resources.html Best, -- Dominik Zyla -- 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, Most likely you need to have ruby-shadow installed on the client. Den On 07/03/2012, at 12:11, Dominik Zyla <dominik.zyla@gmail.com> wrote:> On Wednesday, 7 March 2012 at 01:38, Forrie wrote: >> I read that this doesn''t always work on every OS. However, I''m on >> RHEL, and from what I''m reading the following should correctly set / >> etc/shadow: >> >> >> @user { "myuser": >> require => Group[''staff''], >> ensure => present, >> uid => ''2345'', >> gid => ''90'', >> shell => ''/bin/bash'', >> comment => ''myuser'', >> home => ''/home/myuser'', >> managehome => true, >> password => "$1$BfhBSUJv$ajfjgfhdskdgfljkfdglkjfdlkfd.", # >> fake hash for this post >> } >> >> >> It creates the user and dependency, but doesn''t touch /etc/shadow. >> >> I need to be able to set this hash with the virtual user for the >> systems we manage. Is there some workaround for this, or is my >> syntax incorrect? > > > Hi, > > Why did you use `@file'' definition instead of `file''? `@file'' only creates virtual resource which will not change anything in your system until you refer to it using `<||>'' notation. This link should clarify you this topic: http://docs.puppetlabs.com/guides/virtual_resources.html > > Best, > > -- > Dominik Zyla > > > -- > 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. >-- 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.