code: def chhome(name, home, persist=False, root=None):
      '''
      Change the home directory of the user, pass True for persist to move files
      to the new home directory if the old home directory exist.
  
      name
          User to modify
  
      home
          New home directory for the user account
  
      presist
          Move contents of the home directory to the new location
  
      root
          Directory to chroot into
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' user.chhome foo /home/users/foo True
      '''
      return _chattrib(name, 'home', home, '-d', persist=persist, root=rootf chhome(name, home, persist=False, root=None):
      '''
      Change the home directory of the user, pass True for persist to move files
      to the new home directory if the old home directory exist.
  
      name
          User to modify
  
      home
          New home directory for the user account
  
      presist
          Move contents of the home directory to the new location
  
      root
          Directory to chroot into
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' user.chhome foo /home/users/foo True
      '''
      return _chattrib(name, 'home', home, '-d', persist=persist, root=root)
docs: Change the home directory of the user, pass True for persist to move files
      to the new home directory if the old home directory exist.
  
      name
          User to modify
  
      home
          New home directory for the user account
  
      presist
          Move contents of the home directory to the new location
  
      root
          Directory to chroot into
  
      CLI Example:
  
      .. code-block:: bash
  
          salt '*' user.chhome foo /home/users/foo True