# File lib/chef/provider/user.rb, line 46
      def load_current_resource
        @current_resource = Chef::Resource::User.new(@new_resource.name)
        @current_resource.username(@new_resource.username)
      
        begin
          user_info = Etc.getpwnam(@new_resource.username)
        rescue ArgumentError => e
          @user_exists = false
          Chef::Log.debug("User #{@new_resource.username} does not exist")
          user_info = nil
        end
        
        if user_info
          @current_resource.uid(user_info.uid)
          @current_resource.gid(user_info.gid)
          @current_resource.comment(user_info.gecos)
          @current_resource.home(user_info.dir)
          @current_resource.shell(user_info.shell)
          @current_resource.password(user_info.passwd)
        
          if @new_resource.password && @current_resource.password == 'x'
            begin
              require 'shadow'
            rescue LoadError
              Chef::Log.error("You must have ruby-shadow installed for password support!")
              raise Chef::Exceptions::MissingLibrary, "You must have ruby-shadow installed for password support!"
            else
              shadow_info = Shadow::Passwd.getspnam(@new_resource.username)
              @current_resource.password(shadow_info.sp_pwdp)
            end
          end
          
          if @new_resource.gid
            convert_group_name
          end
        end
        
        @current_resource
      end