code: def info(name, root=None):
      '''
      Return user information
  
      name
          User to get the information
  
      root
          Directory to chroot into
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' user.info root
      '''
      # If root is provided, we use a less portable solution that
      # depends on analyzing /etc/passwd manually. Of course we cannot
      # find users from NIS nor LDAP, but in those cases do not makes
      # sense to provide a root parameter.
      #
      # Please, note that if the non-root /etc/passwd file is long the
      # iteration can be slow.
      if root is not None and __grains__['kernel'] != 'AIX':
          getpwnam = functools.partial(_getpwnam, root=root)
      else:
          getpwnam = functools.partial(pwd.getpwnam)
  
      try:
          data = getpwnam(_quote_username(name))
      except KeyError:
          return {}
      else:
          return _format_info(dataf info(name, root=None):
      '''
      Return user information
  
      name
          User to get the information
  
      root
          Directory to chroot into
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' user.info root
      '''
      # If root is provided, we use a less portable solution that
      # depends on analyzing /etc/passwd manually. Of course we cannot
      # find users from NIS nor LDAP, but in those cases do not makes
      # sense to provide a root parameter.
      #
      # Please, note that if the non-root /etc/passwd file is long the
      # iteration can be slow.
      if root is not None and __grains__['kernel'] != 'AIX':
          getpwnam = functools.partial(_getpwnam, root=root)
      else:
          getpwnam = functools.partial(pwd.getpwnam)
  
      try:
          data = getpwnam(_quote_username(name))
      except KeyError:
          return {}
      else:
          return _format_info(data)
docs: Return user information
  
      name
          User to get the information
  
      root
          Directory to chroot into
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' user.info root