OS Manuals

/usr/bin/cvtsudoers

Give certain users the ability to run some commands as root

From sudo 1.9.17_p2-r12 (os), captured 2026-11-05 by running cvtsudoers --help (exit 0). permalink

cvtsudoers: /etc/sudo.conf is owned by uid 1100, should be 0
cvtsudoers - convert between sudoers file formats

usage: cvtsudoers [-ehMpV] [-b dn] [-c conf_file ] [-d deftypes] [-f output_format] [-i input_format] [-I increment] [-m filter] [-o output_file] [-O start_point] [-P padding] [-s sections] [input_file]

Options:
  -b, --base=dn              the base DN for sudo LDAP queries
  -c, --config=conf_file     the path to the configuration file
  -d, --defaults=deftypes    only convert Defaults of the specified types
  -e, --expand-aliases       expand aliases when converting
  -f, --output-format=format set output format: JSON, LDIF or sudoers
  -i, --input-format=format  set input format: LDIF or sudoers
  -I, --increment=num        amount to increase each sudoOrder by
  -h, --help                 display help message and exit
  -m, --match=filter         only convert entries that match the filter
  -M, --match-local          match filter uses passwd and group databases
  -o, --output=output_file   write converted sudoers to output_file
  -O, --order-start=num      starting point for first sudoOrder
  -p, --prune-matches        prune non-matching users, groups and hosts
  -P, --padding=num          base padding for sudoOrder increment
  -s, --suppress=sections    suppress output of certain sections
  -V, --version              display version information and exit
Options (19)
OptionDescriptionSource
-b, --base dnThe base DN (distinguished name) that will be used when performing LDAP queries.help + man
-c, --config conf_fileSpecify the path to the configuration file.help + man
-d, --defaults deftypesOnly convert Defaults entries of the specified types.help + man
-e, --expand-aliasesexpand aliases when convertinghelp + man
-i, --input-format formatset input format: LDIF or sudoershelp + man
-I, --increment numWhen generating LDIF output, increment each sudoOrder attribute by the specified number.help + man
-h, --helpDisplay a short help message to the standard output and exit.help + man
-m, --match filterOnly output rules that match the specified filter.help + man
-M, --match-localWhen the -m option is also specified, use password and group database information when matching users and groups in the filter.help + man
-o, --output output_fileWrite the converted output to output_file.help + man
-O, --order-start numWhen generating LDIF output, use the number specified by start_point in the sudoOrder attribute of the first sudoRole object.help + man
-p, --prune-matchesWhen the -m option is also specified, cvtsudoers will prune out non-matching users, groups, and hosts from matching entries.help + man
-P, --padding numWhen generating LDIF output, construct the initial sudoOrder value by concatenating order_start and increment, padding the increment with zeros until it consists of padding digits.help + man
-s, --suppress sectionsSuppress the output of specific sections of the security policy.help + man
-V, --versionPrint the cvtsudoers and sudoers grammar versions and exit.help + man
-f, --output-format output_formatSpecify the output format (case-insensitive). (in the manual page but not in --help)man
--group-file fileWhen the -M option is also specified, perform group queries using file instead of the system group database. (in the manual page but not in --help)man
-l, --logfile log_fileLog conversion warnings to log_file instead of to the standard error. (in the manual page but not in --help)man
--passwd-file fileWhen the -M option is also specified, perform passwd queries using file instead of the system passwd database. (in the manual page but not in --help)man
Examples (6) from the manual page, untested

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.