Provisioner

class rubin.nublado.inithome.provisioner.Provisioner(home, uid, gid)

Bases: object

Create the user’s home directory if it doesn’t exist.

Parameters:
  • home (Path) – Path to the home directory to create.

  • uid (int) – Numeric UID of the user.

  • gid (int) – Numeric primary GID of the user.

Methods Summary

provision()

Create the user's home directory.

Methods Documentation

async provision()

Create the user’s home directory.

If the home directory doesn’t exist, create it and set it to mode 0700. If it already exists, verify that it is a directory and owned by the correct UID and GID. If the permissions are incorrect and the directory is empty, fix the ownership; otherwise, warn but continue. Warn about unexpected modes, but don’t treat them as fatal errors.

Raises:

InvalidHomeError – Raised if the path exists but is not a directory, or if it has the wrong ownership but is not empty.

Return type:

None