Re: [Puppet Users] Workaround for user password hash

2014-02-06 Thread Brian Mathis
On Thu, Feb 6, 2014 at 5:12 AM, wrote: > On Wednesday, February 5, 2014 8:31:21 PM UTC+1, Brian Mathis wrote: > > >> There is nothing wrong with the sha1() function, it's just being used >> incorrectly. >> > > Just for the record, what would be the correct way to use it for this > purpose? > > I

Re: [Puppet Users] Workaround for user password hash

2014-02-06 Thread Peter Meier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > I suppose it will be useful if I share a workaround I just found > for a problem I encountered. > > I needed a "user" puppet resource to add a user and set its > password, on CentOS 6.4. The manifest was applied with no errors, > but the password wa

Re: [Puppet Users] Workaround for user password hash

2014-02-06 Thread Chuck Anderson
On Thu, Feb 06, 2014 at 02:26:09AM -0800, zerozerouno...@gmail.com wrote: > On Thursday, February 6, 2014 11:15:04 AM UTC+1, Felix.Frank wrote: > > Heh, well the thing with single quotes is - those will make *all* > > characters be interpreted literally, including the backslashes. > > > > Uhm…

Re: [Puppet Users] Workaround for user password hash

2014-02-06 Thread zerozerounouno
On Thursday, February 6, 2014 11:15:04 AM UTC+1, Felix.Frank wrote: Heh, well the thing with single quotes is - those will make *all* > characters be interpreted literally, including the backslashes. > Uhm… according to < http://docs.puppetlabs.com/puppet/latest/reference/lang_datatypes.html#si

Re: [Puppet Users] Workaround for user password hash

2014-02-06 Thread Felix Frank
Heh, well the thing with single quotes is - those will make *all* characters be interpreted literally, including the backslashes. So it's pretty hard to include a single quote in a single quoted string. You end up with pretties like echo 'It'"'"'s working!' Though I may be missing a popular work

Re: [Puppet Users] Workaround for user password hash

2014-02-06 Thread zerozerounouno
On Wednesday, February 5, 2014 8:31:21 PM UTC+1, Brian Mathis wrote: > There is nothing wrong with the sha1() function, it's just being used > incorrectly. > Just for the record, what would be the correct way to use it for this purpose? I think it could be an interesting topic: when searchin

Re: [Puppet Users] Workaround for user password hash

2014-02-06 Thread zerozerounouno
On Wednesday, February 5, 2014 7:57:01 PM UTC+1, Jeremy wrote: > I believe Chuck is on the right path.. Just from a simple test > (https://gist.github.com/jbouse/8830543) this shows that using the > double quotes is incorrect. Well… it's not "incorrect": you _can_ use double quotes. You jus

Re: [Puppet Users] Workaround for user password hash

2014-02-06 Thread zerozerounouno
On Wednesday, February 5, 2014 7:25:53 PM UTC+1, Chuck Anderson wrote: > Use single quotes rather than double quotes so the $ aren't > interpolated as variables: > But if you are accustomed to using double quotes around strings, you might prefer using them here too, for consistency. Just be

Re: [Puppet Users] Workaround for user password hash

2014-02-05 Thread Brian Mathis
On Wed, Feb 5, 2014 at 1:25 PM, Chuck Anderson wrote: > On Wed, Feb 05, 2014 at 09:48:59AM -0800, zerozerouno...@gmail.com wrote: > > I needed a "user" puppet resource to add a user and set its password, on > > CentOS 6.4. > > The manifest was applied with no errors, but the password was not set

Re: [Puppet Users] Workaround for user password hash

2014-02-05 Thread Jeremy T. Bouse
I believe Chuck is on the right path.. Just from a simple test (https://gist.github.com/jbouse/8830543) this shows that using the double quotes is incorrect. On 05.02.2014 13:25, Chuck Anderson wrote: On Wed, Feb 05, 2014 at 09:48:59AM -0800, zerozerouno...@gmail.com wrote: I needed a "user" p

Re: [Puppet Users] Workaround for user password hash

2014-02-05 Thread Chuck Anderson
On Wed, Feb 05, 2014 at 09:48:59AM -0800, zerozerouno...@gmail.com wrote: > I needed a "user" puppet resource to add a user and set its password, on > CentOS 6.4. > The manifest was applied with no errors, but the password was not set > correctly. > > I tried: > > password => sha1("password")