Method: Chef::Util::Windows::NetUser#enable_account
- Defined in:
- lib/chef/util/windows/net_user.rb
#enable_account ⇒ Object
160 161 162 163 164 165 166 167 168 |
# File 'lib/chef/util/windows/net_user.rb', line 160 def enable_account user_modify do |user| user[:flags] &= ~NetUser::UF_ACCOUNTDISABLE # This does not set the password to nil. It (for some reason) means to ignore updating the field. # See similar behavior for the logon_hours field documented at # http://msdn.microsoft.com/en-us/library/windows/desktop/aa371338%28v=vs.85%29.aspx user[:password] = nil end end |