7.7.1 ‘as_root()’

‘as_root()’ calls the rest of the arguments as a different user. Unless a $user environment variable is set, it will call the following arguments as the root user. It supports the following programs for privilege escalation with the following order:

  1. ‘ssu’
  2. ‘sudo’
  3. ‘doas’
  4. ‘su’

The program called for this operation can be overridden using the $CPT_SU variable.