From 86c206b1dc51936aadfc1140a97759b5194b629b Mon Sep 17 00:00:00 2001 From: luke Date: Wed, 25 Apr 2007 21:44:22 +0000 Subject: Possibly adding the ability to manage passwords on os x. I expect it does not work, since there is probably no way to set up an encrypted password, but at least it now creates a user that can not log in by default. git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2415 980ebf18-57e1-0310-9a29-db15c13687c0 --- lib/puppet/provider/user/netinfo.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/puppet/provider/user/netinfo.rb b/lib/puppet/provider/user/netinfo.rb index 08bea2ffc..b86ed8c54 100644 --- a/lib/puppet/provider/user/netinfo.rb +++ b/lib/puppet/provider/user/netinfo.rb @@ -5,14 +5,21 @@ require 'puppet/provider/nameservice/netinfo' Puppet::Type.type(:user).provide :netinfo, :parent => Puppet::Provider::NameService::NetInfo do desc "User management in NetInfo. Note that NetInfo is not smart enough to fill in default information for users, so this provider will use default settings for home (``/var/empty``), shell (``/usr/bin/false``), - and comment (the user name, capitalized). These defaults are only used when the user is created." + comment (the user name, capitalized), and password ('********'). These defaults are only used when the user is created. + Note that password management probably does not really work -- OS X does not store the password in NetInfo itself, + yet we cannot figure out how to store the encrypted password where OS X will look for it. The main reason the password + support is even there is so that a default password is created, which effectively locks people out, even if it does not + enable us to set a password." commands :nireport => "nireport", :niutil => "niutil" options :comment, :key => "realname" + options :password, :key => "passwd" defaultfor :operatingsystem => :darwin - autogen_defaults :home => "/var/empty", :shell => "/usr/bin/false" + autogen_defaults :home => "/var/empty", :shell => "/usr/bin/false", :password => '********' + + has_features :manages_passwords verify :gid, "GID must be an integer" do |value| value.is_a? Integer -- cgit