manage passwords on several systems

22 views
Skip to first unread message

filip hosten

unread,
Apr 26, 2016, 10:38:28 AM4/26/16
to Puppet Users
Hi,

I'm writing a manifest to distribute the puppet master's shadow passwords for selected users to the clients.

If a user want to change the password (as it is 1month valid) on the puppet master, it should be distributed to the nodes with the next run.


I'm using "generate" in combination with sudo to read out the /etc/shadow and store it in a puppet variable.

But I get the error message that only alphanumeric, fileseparators and dashes are allowed in the result of the generate function.

I gues the dollar sign, and other characters in the shadow hashes are the cause here.

Any other method to read out the shadow hash and store it in a variable so that I can use it in setting the password for a user?


thanks in advance.

Filip Hosten.

Rob Nelson

unread,
Apr 26, 2016, 11:13:47 AM4/26/16
to puppet...@googlegroups.com
Filip, is there a reason you're managing the shadow file directly instead of feeding the right strings into the user resource's password parameter? https://docs.puppet.com/puppet/latest/reference/type.html#user-attribute-password. That may obviate some of your issues.

Otherwise, can you show the code you're using?

--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/26234be5-4d8d-4caa-8c2f-9bab49bff006%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages