Hi, Put the user declaration in a file, or use ' instead of " ( then you'll have to escape all ' )
The problem is that you are using ", so the shell is interpreting $6 and $salt as empty variables. Regards El 04/06/2014 15:31, "Martin Supiot" <[email protected]> escribió: > Hi! > > I try to set a user password. I do : > > vagrant@db:~$ sudo puppet apply -e "user { 'martin': name => 'martin', > ensure => 'present', password => > '$6$salt$RheJLXa4oI89Bob98PelI2w1l7.StNxtasDd0hBJbGUrSahnzsSf3rZ8.CoT9CoTNd/6qyaieI7lunITBZaRP1'}" > Notice: Compiled catalog for db in environment production in 0.06 seconds > Notice: /Stage[main]/Main/User[martin]/password: changed password > Notice: Finished catalog run in 0.06 seconds > vagrant@db:~$ su martin > Password: > su: Authentication failure > > I can't authenticate. If I check the password, I see it truncated ... > > vagrant@db:~$ sudo cat /etc/shadow |grep ^martin > > martin:.StNxtasDd0hBJbGUrSahnzsSf3rZ8.CoT9CoTNd/6qyaieI7lunITBZaRP1:16225:0:99999:7::: > > If I try to change it in cli, it's ok > > vagrant@db:~$ passwd martin > passwd: You may not view or modify password information for martin. > vagrant@db:~$ sudo passwd martin > Enter new UNIX password: > Retype new UNIX password: > passwd: password updated successfully > vagrant@db:~$ sudo cat /etc/shadow |grep ^martin > > martin:$6$iH/04P.R$oPNMDpgNrS2glZLrBdoo15w76Z77DK9ywcyllrgakcDg32GKUjyfRGTfHcNvd8rNpOC2b.C3p9xssF9mwN7iI/:16225:0:99999:7::: > > I can connect ! > > vagrant@db:~$ su martin > Password: > martin@db:/home/vagrant$ exit > > I'm on a ubuntu 14.04 with ruby-shadows package installed. Any idea ? > > Thanks > > -- > 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/c148873e-43b0-4aca-ac8d-fb9b5b18333f%40googlegroups.com > <https://groups.google.com/d/msgid/puppet-users/c148873e-43b0-4aca-ac8d-fb9b5b18333f%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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/CAF_B3dcTj925GqkPj%3DZdynyqrig%3DL6LC%3D250whyFWq2fJstJmg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
