Patrick Cable <[email protected]> writes:

> Does anyone have any experience getting the ruby-shadow bindings for
> libshadow working on a solaris box? I'd like puppet to manage
> passwords on the solaris side, but it would seem that without this
> library I'm only able to check for the users existence and maybe
> change their shell.

    Not directly, but I happen to have looked at this particular spot
of puppet's.

    What version of puppet are you running, and is it using the
user_role_add provider for users?  It should be the default for
solaris.  My reading of both 0.24.8 and 0.25.1's user_role_add
providers is that it should be doing it's own password management,
without dependancies on libshadow.

    More generally, this part of puppet is quite light if hacking ruby
code is something you can do.  Take a look at
lib/puppet/provider/user/user_role_add.rb for an idea how read and
write of a password entry can work in puppet, noting that the the bulk
of the password code is involved with the mechanics of reading/writing
/etc/shadow, rather than puppet per se.  The actual parts that deal
with puppet are roughly:

has_features :manages_passwords
def password
    # Do whatever you must to get the hash, and return it.
end

def password=(hash)
    # Do whatever you must to put the hash somewhere
end

_______________________________________________
bblisa mailing list
[email protected]
http://www.bblisa.org/mailman/listinfo/bblisa

Reply via email to