Visudo: Difference between revisions

From ICO wiki
Jump to navigationJump to search
(Created page with "Arti Suviste A21 2015/2016")
 
No edit summary
Line 1: Line 1:
Arti Suviste A21 2015/2016
==Autor==
Eesti Infotehnoloogia Kolledž<br>
Arti Suviste A21
 
==Sissejuhatus==
Visudo on programm, mida kasutatakse ''sudoers'' konfiguratsioonifaili muutmiseks. Visudo laseb ''sudoers'' faili muuta turvaliselt, ükshaaval ning kontrollides parsimisvigu.
 
==Kasutamine==
Visudot kasutatakse sudoers faili avamiseks, selleks, et muutda, lisada või eemaldada kasutajate õigusi. Sudoers fail asub /etc/sudoers kaustas. Visudo kontrollib, et muudetud faili süntaks oleks õige ja annab veateate, kui see pole. Kui kasutaja teeb vea, siis faili ei salvestata, vaid prinditakse välja rida/read, kus on tekkinud viga.
Visudot saab ainult käivitada juurkasutaja õigustega.
 
===Käsu argumendid ===
-c, --check
Enable check-only mode. The existing sudoers file will be checked for syntax errors, owner and mode. A message will be printed to the standard output describing the status of sudoers unless the -q option was specified. If the check completes successfully, visudo will exit with a value of 0. If an error is encountered, visudo will exit with a value of 1.
-f sudoers, --file=sudoers
Specify an alternate sudoers file location. With this option, visudo will edit (or check) the sudoers file of your choice, instead of the default, /etc/sudoers. The lock file used is the specified sudoers file with “.tmp” appended to it. In check-only mode only, the argument to -f may be ‘-’, indicating that sudoers will be read from the standard input.
-h, --help
Display a short help message to the standard output and exit.
-q, --quiet
Enable quiet mode. In this mode details about syntax errors are not printed. This option is only useful when combined with the -c option.
-s, --strict
Enable strict checking of the sudoers file. If an alias is used before it is defined, visudo will consider this a parse error. Note that it is not possible to differentiate between an alias and a host name or user name that consists solely of uppercase letters, digits, and the underscore (‘_’) character.
-V, --version
Print the visudo and sudoers grammar versions and exit.
-x output_file, --export=output_file
Export a sudoers in JSON format and write it to output_file. If output_file is ‘-’, the exported sudoers policy will be written to the standard output. By default, /etc/sudoers (and any files it includes) will be exported. The -f option can be used to specify a different sudoers file to export. The exported format is intended to be easier for third-party applications to parse than the traditional sudoers format. The various values have explicit types which removes much of the ambiguity of the sudoers format.

Revision as of 17:48, 30 November 2015

Autor

Eesti Infotehnoloogia Kolledž
Arti Suviste A21

Sissejuhatus

Visudo on programm, mida kasutatakse sudoers konfiguratsioonifaili muutmiseks. Visudo laseb sudoers faili muuta turvaliselt, ükshaaval ning kontrollides parsimisvigu.

Kasutamine

Visudot kasutatakse sudoers faili avamiseks, selleks, et muutda, lisada või eemaldada kasutajate õigusi. Sudoers fail asub /etc/sudoers kaustas. Visudo kontrollib, et muudetud faili süntaks oleks õige ja annab veateate, kui see pole. Kui kasutaja teeb vea, siis faili ei salvestata, vaid prinditakse välja rida/read, kus on tekkinud viga. Visudot saab ainult käivitada juurkasutaja õigustega.

Käsu argumendid

-c, --check Enable check-only mode. The existing sudoers file will be checked for syntax errors, owner and mode. A message will be printed to the standard output describing the status of sudoers unless the -q option was specified. If the check completes successfully, visudo will exit with a value of 0. If an error is encountered, visudo will exit with a value of 1. -f sudoers, --file=sudoers Specify an alternate sudoers file location. With this option, visudo will edit (or check) the sudoers file of your choice, instead of the default, /etc/sudoers. The lock file used is the specified sudoers file with “.tmp” appended to it. In check-only mode only, the argument to -f may be ‘-’, indicating that sudoers will be read from the standard input. -h, --help Display a short help message to the standard output and exit. -q, --quiet Enable quiet mode. In this mode details about syntax errors are not printed. This option is only useful when combined with the -c option. -s, --strict Enable strict checking of the sudoers file. If an alias is used before it is defined, visudo will consider this a parse error. Note that it is not possible to differentiate between an alias and a host name or user name that consists solely of uppercase letters, digits, and the underscore (‘_’) character. -V, --version Print the visudo and sudoers grammar versions and exit. -x output_file, --export=output_file Export a sudoers in JSON format and write it to output_file. If output_file is ‘-’, the exported sudoers policy will be written to the standard output. By default, /etc/sudoers (and any files it includes) will be exported. The -f option can be used to specify a different sudoers file to export. The exported format is intended to be easier for third-party applications to parse than the traditional sudoers format. The various values have explicit types which removes much of the ambiguity of the sudoers format.