Wednesday, May 5, 2010

Managing Users With Puppet from the Command Line

While in the process of deploying Puppet, I had the sudden need to manage some users' passwords. Since I already had the software installed, I thought ralsh would be the easiest way to handle the job. I could have scripted a bunch of ssh/awk/sed/etc commands, but that just didn't seem very robust. Sure, it'd have worked fine back in 1999, but this is Two Thousand Freaking Ten.

Here's the script I wrote.

WARNING: You'll need to disable history or otherwise remove the shell history file after relogging.

blog comments powered by Disqus