Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2012
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $user='user here'
  2. $hashedpasswd='hash_here'
  3. exec { 'setpass':
  4. command => "usermod -p \"$hashedpasswd\" $user",
  5. path => "/bin:/usr/bin:/sbin:/usr/sbin",
  6. onlyif => "grep -q $user /etc/passwd",
  7. unless => "egrep -q "$user.*$hashedpasswd" /etc/shadow",
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement