{"id":681,"date":"2022-02-17T10:36:14","date_gmt":"2022-02-17T07:36:14","guid":{"rendered":"http:\/\/tietokanta.dy.fi\/linux\/?p=681"},"modified":"2022-02-17T14:49:14","modified_gmt":"2022-02-17T11:49:14","slug":"sudo","status":"publish","type":"post","link":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/2022\/02\/17\/sudo\/","title":{"rendered":"Sudo"},"content":{"rendered":"\n<p>Sudo-komennon avulla voit ajaa ohjelmia toisen k\u00e4ytt\u00e4j\u00e4n suojausoikeuksilla (oletusarvoisesti p\u00e4\u00e4k\u00e4ytt\u00e4j\u00e4n\u00e4). Se pyyt\u00e4\u00e4 sinua antamaan henkil\u00f6kohtaisen salasanasi ja vahvistaa pyynt\u00f6si suorittaa komennon tarkistamalla sudoers-nimisen tiedoston, jonka j\u00e4rjestelm\u00e4nvalvoja m\u00e4\u00e4ritt\u00e4\u00e4.<\/p>\n\n\n\n<p>Yleisin komento jolla p\u00e4\u00e4st\u00e4\u00e4n p\u00e4\u00e4k\u00e4ytt\u00e4j\u00e4ksi ja samalla root kotikansioon on <strong>sudo -i<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><a href=\"http:\/\/tietokanta.dy.fi\/linux\/wp-content\/uploads\/2022\/02\/sudo.jpg\"><img loading=\"lazy\" width=\"199\" height=\"71\" src=\"http:\/\/tietokanta.dy.fi\/linux\/wp-content\/uploads\/2022\/02\/sudo.jpg\" alt=\"Sudo -i \" class=\"wp-image-682\" title=\"\"\/><\/a><\/figure>\n\n\n\n<p>Sudo valinnat:<\/p>\n\n\n\n<p>usage: sudo -h | -K | -k | -V<br>usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]<br>usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]<br>[command]<br>usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p<br>prompt] [-T timeout] [-u user] [VAR=value] [-i|-s] []<br>usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p<br>prompt] [-T timeout] [-u user] file \u2026<\/p>\n\n\n\n<p>Options:<br>-A, &#8211;askpass use a helper program for password prompting<br>-b, &#8211;background run command in the background<br>-C, &#8211;close-from=num close all file descriptors &gt;= num<br>-E, &#8211;preserve-env preserve user environment when running command<br>&#8211;preserve-env=list preserve specific environment variables<br>-e, &#8211;edit edit files instead of running a command<br>-g, &#8211;group=group run command as the specified group name or ID<br>-H, &#8211;set-home set HOME variable to target user&#8217;s home dir<br>-h, &#8211;help display help message and exit<br>-h, &#8211;host=host run command on host (if supported by plugin)<br>-i, &#8211;login run login shell as the target user; a command<br>may also be specified<br>-K, &#8211;remove-timestamp remove timestamp file completely<br>-k, &#8211;reset-timestamp invalidate timestamp file<br>-l, &#8211;list list user&#8217;s privileges or check a specific<br>command; use twice for longer format<br>-n, &#8211;non-interactive non-interactive mode, no prompts are used<br>-P, &#8211;preserve-groups preserve group vector instead of setting to<br>target&#8217;s<br>-p, &#8211;prompt=prompt use the specified password prompt<br>-r, &#8211;role=role create SELinux security context with specified<br>role<br>-S, &#8211;stdin read password from standard input<br>-s, &#8211;shell run shell as the target user; a command may<br>also be specified<br>-t, &#8211;type=type create SELinux security context with specified<br>type<br>-T, &#8211;command-timeout=timeout terminate command after the specified time limit<br>-U, &#8211;other-user=user in list mode, display privileges for user<br>-u, &#8211;user=user run command (or edit file) as specified user<br>name or ID<br>-V, &#8211;version display version information and exit<br>-v, &#8211;validate update user&#8217;s timestamp without running a<br>command<br>&#8212; stop processing command line arguments<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sudo-komennon avulla voit ajaa ohjelmia toisen k\u00e4ytt\u00e4j\u00e4n suojausoikeuksilla (oletusarvoisesti p\u00e4\u00e4k\u00e4ytt\u00e4j\u00e4n\u00e4). Se pyyt\u00e4\u00e4 sinua antamaan henkil\u00f6kohtaisen salasanasi ja vahvistaa pyynt\u00f6si suorittaa komennon tarkistamalla sudoers-nimisen tiedoston, jonka j\u00e4rjestelm\u00e4nvalvoja m\u00e4\u00e4ritt\u00e4\u00e4. Yleisin komento jolla p\u00e4\u00e4st\u00e4\u00e4n p\u00e4\u00e4k\u00e4ytt\u00e4j\u00e4ksi ja samalla root kotikansioon on sudo -i Sudo valinnat: usage: sudo -h | -K | -k | -Vusage: sudo -v [-AknS] [-g group] &hellip; <a href=\"http:\/\/tietokanta.dy.fi\/linux\/index.php\/2022\/02\/17\/sudo\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Sudo<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/posts\/681"}],"collection":[{"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/comments?post=681"}],"version-history":[{"count":7,"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/posts\/681\/revisions"}],"predecessor-version":[{"id":697,"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/posts\/681\/revisions\/697"}],"wp:attachment":[{"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/media?parent=681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/categories?post=681"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/tietokanta.dy.fi\/linux\/index.php\/wp-json\/wp\/v2\/tags?post=681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}