Andreas Dvorak
2013-Aug-05 13:16 UTC
[Puppet Users] user add password string wrong because of $
Hello, I want to add user with puppet. In my password string I have three times the $. The result is that in the password of the the /etc/shadow file everything from $ until a . or / is missing. password => "$6$0vY.Ob.b$uOClxMYJohHBH46X/ESzliv.Jxt1XoWXjbLXtnf5JzqL5pP.caiF0JMxjptxEq9gj72KrU7CqB7ez", results to user1:.Ob.b/ESzliv.Jxt1XoWXjbLXtnf5JzqL5pP.caiF0JMxjptxEq9gj72KrU7CqB7ez:15922:0:99999:7::: $6$0vY.Ob.b$uOClxMYJohHBH46X/ESzliv.Jxt1XoWXjbLXtnf5JzqL5pP.caiF0JMxjptxEq9gj72KrU7CqB7ez .Ob.b /ESzliv.Jxt1XoWXjbLXtnf5JzqL5pP.caiF0JMxjptxEq9gj72KrU7CqB7ez Does anybody has an solution for that? Best regards Andreas -- 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Andreas Dvorak
2013-Aug-05 13:25 UTC
[Puppet Users] Re: user add password string wrong because of $
> > >Here my init.pp define useradd ( $name, $uid, $group, $gid, $password, $shell, $sshkeytype, $sshkey) { $homedir = $kernel ? { ''SunOS'' => ''/export/home'', default => ''/home'' } $username = $title user { $username: ensure => present, comment => "$name", uid => "$uid", gid => "$gid", shell => "$shell", home => "$homedir/$username", managehome => true, password => "$password", require => group["$group"], } group { $group: gid => "$gid", } exec { $username: command => "/bin/cp -R /etc/skel $homedir/$username; /bin/chown -R $username:$group $homedir/$username ", creates => "$homedir/$username", require => user["$username"], } ssh_authorized_key { $username: user => "$username", type => "$sshkeytype", key => "$sshkey", require => exec["$username"], } } -- 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Arthur Furlan
2013-Aug-05 13:34 UTC
Re: [Puppet Users] user add password string wrong because of $
On Mon, Aug 5, 2013 at 10:16 AM, Andreas Dvorak <andreas.dvorak@googlemail.com> wrote:> > Hello, > > I want to add user with puppet. In my password string I have three times the $. > The result is that in the password of the the /etc/shadow file everything from $ until a . or / is missing. > > password => "$6$0vY.Ob.b$uOClxMYJohHBH46X/ESzliv.Jxt1XoWXjbLXtnf5JzqL5pP.caiF0JMxjptxEq9gj72KrU7CqB7ez",[...]> Does anybody has an solution for that?You can solve this problem by defining the password with single quotes: password => ''$6$0vY.Ob.b$uOClxMYJohHBH46X/ESzliv.Jxt1XoWXjbLXtnf5JzqL5pP.caiF0JMxjptxEq9gj72KrU7CqB7ez'', -- Arthur Furlan -- 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
David Schmitt
2013-Aug-05 13:45 UTC
Re: [Puppet Users] user add password string wrong because of $
On 05.08.2013 15:16, Andreas Dvorak wrote:> Hello, > I want to add user with puppet. In my password string I have three times > the $. > The result is that in the password of the the /etc/shadow file > everything from $ until a . or / is missing. > password => > "$6$0vY.Ob.b$uOClxMYJohHBH46X/ESzliv.Jxt1XoWXjbLXtnf5JzqL5pP.caiF0JMxjptxEq9gj72KrU7CqB7ez",use single quotes or backslashes: password => ''$foo'' or password => "\$foo" Regards, David -- 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Andreas Dvorak
2013-Aug-05 14:09 UTC
Re: [Puppet Users] user add password string wrong because of $
thank you, single quotes solved it regards, Andreas -- 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.