Hi All,

I am trying to using Puppet to add a user with a password on an Ubuntu 
12.04 system with Ruby 1.8.7. I have tried this in the two ways as detailed 
below. In both cases, the attempt fails with the message "Provider useradd 
does not support features manages_passwords; not managing attribute 
password". I have read various posts about the requirement for libshadow. 
In both the approaches I tried, I *think* I am satisfying this but perhaps 
not. Any help is appreciated. 

1. Install libshadow at the command line and then run my puppet script
$sudo apt-get update
$sudo apt-get install libshadow-ruby1.8
$puppet apply myuserscript
 
2. Install libshadow as part of my manifest setup. The relevant code from 
my classes is:
 
class hadoop::usr ($usr_name = 'hadoop', $hashed_pw = undef) {
    
        include ruby::libshadow
 group { $usr_name:
ensure => present,
}
 user { $usr_name:
ensure     => present,
gid     => $usr_name,
home   => "/home/${usr_name}",
password => $hashed_pw,
managehome => true,
}
   Class['ruby::libshadow'] -> Group[$usr_name] -> User[$usr_name]
}

class ruby::libshadow {
package {'libshadow-ruby1.8':
ensure => installed,
}
}

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-users/-/HVFI5mh5Bj8J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to