{"id":3301,"date":"2018-05-26T14:22:13","date_gmt":"2018-05-26T05:22:13","guid":{"rendered":"http:\/\/www.code-magagine.com\/?p=3301"},"modified":"2023-05-27T21:26:59","modified_gmt":"2023-05-27T12:26:59","slug":"%e3%80%90linux%e3%80%91%e4%b8%80%e8%88%ac%e3%83%a6%e3%83%bc%e3%82%b6%e3%83%bc%e3%81%absudo%e6%a8%a9%e9%99%90%e3%82%92%e6%b8%a1%e3%81%99%e3%81%ab%e3%81%af%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/www.code-magagine.com\/?p=3301","title":{"rendered":"\u3010Linux\u3011\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u3067sudo\u304c\u3067\u304d\u306a\u3044\u5834\u5408\u3001wheel\u30b0\u30eb\u30fc\u30d7\u306b\u3064\u3044\u3066"},"content":{"rendered":"<p>\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u3067\u3001sudo\u3092\u5b9f\u884c\u3057\u3088\u3046\u3068\u3057\u305f\u3089\u4e0b\u8a18\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u3066sudo\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002<\/p>\n<div class=\"graybox\">\n<pre class=\"lang:default decode:true \">[user1@localhost ~]$ sudo ls\r\n[sudo] password for user1:\r\nuser1 is not in the sudoers file. This incident will be reported.\r\n[user1@localhost ~]$<\/pre>\n<p>\u30eb\u30fc\u30c8\u6a29\u9650\u306b\u306a\u3063\u3066\u3001\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3057\u307e\u3059\u3002(visudo\u306b\u3088\u3063\u3066\u300c\/etc\/sudoers\u30d5\u30a1\u30a4\u30eb:sudo\u306e\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u300d\u3092\u3044\u3058\u308b\uff09<\/p>\n<\/div>\n<pre class=\"lang:default decode:true\">visudo<\/pre>\n<div>\n<p>\u300c%wheel\u300d\u306e\u524d\u306e\u30b3\u30e1\u30f3\u30c8\u3092\u5916\u3057\u307e\u3059\u3002<\/p>\n<\/div>\n<pre class=\"lang:default decode:true\">## Allows people in group wheel to run all commands\r\n %wheel ALL=(ALL)       ALL<\/pre>\n<p>\u4fdd\u5b58\u3057\u307e\u3059\u3002<\/p>\n<p>\u4e0b\u8a18\u306e\u30b3\u30de\u30f3\u30c9\u3067\u3001\u300cwheel\u30b0\u30eb\u30fc\u30d7\u300d\u306b\u30e6\u30fc\u30b6\u30fc\u3092\u8ffd\u52a0\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:default decode:true\">usermod -G wheel \u30e6\u30fc\u30b6\u30fc\u540d<\/pre>\n<p>\u518d\u5ea6\u3001\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u306b\u306a\u308b\u3068\u3001sudo\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3306\" src=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/sudo.png\" alt=\"\" width=\"403\" height=\"63\" srcset=\"http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/sudo.png 403w, http:\/\/www.code-magagine.com\/wp-content\/uploads\/2018\/05\/sudo-300x47.png 300w\" sizes=\"(max-width: 403px) 100vw, 403px\" \/><\/p>\n<h2>wheel\uff08\u30db\u30a4\u30fc\u30eb\uff09\u3068\u306f\uff1f<\/h2>\n<p>Linux\u3092\u542b\u3080\u5404\u7a2eUNIX\u7cfb\u306e\u30b7\u30b9\u30c6\u30e0\u5171\u901a\u306b\u3042\u308b\u6982\u5ff5\u3067\u5168\u3066\u306e\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u304c\u8a31\u53ef\u3055\u308c\u3066\u3044\u308b\u30b9\u30fc\u30d1\u30fc\u30e6\u30fc\u30b6\u30fc\uff08root\uff09\u306b\u76f8\u5f53\u3059\u308b\u6a29\u9650\u3092\u4e0e\u3048\u3089\u308c\u305f\u30b0\u30eb\u30fc\u30d7\u306e\u3053\u3068\u3067\u3059\u3002\u540d\u524d\u306e\u7531\u6765\u3068\u3057\u3066\u306fbig wheel\u3067\u300c\u5927\u7269\u300d\u3060\u3063\u305f\u308a\u300c\u5b9f\u529b\u8005\u300d\u3068\u3044\u3046\u610f\u5473\u304c\u3042\u308b\u3088\u3046\u3067\u3059\u3002<\/p>\n<p>\u8a2d\u5b9a\u30d5\u30a1\u30a4\u30eb\u3067\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u3053\u306e\u540d\u524d\u304c\u4f7f\u308f\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u8a2d\u5b9a\u3067\u5f8c\u304b\u3089\u3044\u304f\u3089\u3067\u3082\u540d\u524d\u306f\u5909\u66f4\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u3067\u306f\u306a\u305c\u3053\u306e\u3088\u3046\u306a\u30b0\u30eb\u30fc\u30d7\u304c\u5b58\u5728\u3057\u3066\u3044\u308b\u306e\u3067\u3057\u3087\u3046\u304b\u3002<\/p>\n<h3>\u6b74\u53f2\u7684\u306a\u80cc\u666f<\/h3>\n<p>su\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u3055\u3048\u77e5\u3063\u3066\u3044\u308c\u3070root\u30e6\u30fc\u30b6\u30fc\u306b\u6c17\u8efd\u306b\u306a\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u3059\u304c\u3001\u3053\u308c\u3060\u3068\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u7684\u306b\u554f\u984c\u304c\u3042\u308b\u3068\u3044\u3046\u3053\u3068\u3067\u300croot\u306e\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u77e5\u3063\u3066\u3044\u308b\u300d\uff0b\u300c\u7279\u5b9a\u306e\u30b0\u30eb\u30fc\u30d7\u306b\u6240\u5c5e\u3057\u3066\u3044\u308b\u300d\u3068\u3044\u3046\u6761\u4ef6\u3092\u6e80\u305f\u3057\u3066\u3044\u308b\u5834\u5408\u3060\u3051\u7ba1\u7406\u8005\u3068\u3057\u3066\u30b3\u30de\u30f3\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3068\u3044\u3046\u6761\u4ef6\u3092\u53b3\u3057\u304f\u3057\u305fUNIX\u304c\u51fa\u6765\u307e\u3057\u305f\u3002\u305d\u308c\u304cwheel\u30b0\u30eb\u30fc\u30d7\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u540c\u3058\u304f\u3088\u304f\u4f7f\u308f\u308c\u3066\u3044\u308b distribution\u306eUbuntu\u3067\u3042\u308c\u3070\u30c7\u30d5\u30a9\u30eb\u30c8\u3067adm\u30b0\u30eb\u30fc\u30d7\u306b\u6240\u5c5e\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u304a\u308a\u3001sudo\u30b3\u30de\u30f3\u30c9\u306e\u5b9f\u884c\u304c\u8a31\u53ef\u3055\u308c\u3066\u3044\u308b\u306e\u3067\u4e0a\u8a18\u306e\u3088\u3046\u306a\u8a2d\u5b9a\u306f\u4e0d\u8981\u3067\u3059\u3002(Ubuntu\u306e\u5834\u5408\u306f\u3001root\u30e6\u30fc\u30b6\u30fc\u304c\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u306f\u7121\u52b9\u306b\u306a\u3063\u3066\u3044\u3066sudo\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3046\u3053\u3068\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u308b\u3002\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"\u4e00\u822c\u30e6\u30fc\u30b6\u30fc\u3067\u3001sudo\u3092\u5b9f\u884c\u3057\u3088\u3046\u3068\u3057\u305f\u3089\u4e0b\u8a18\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u51fa\u3066sudo\u3092\u5b9f\u884c\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 [user1@localhost ~]$ sudo ls [sudo] password for user1: [&hellip;]","protected":false},"author":1,"featured_media":1094,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[39],"tags":[],"_links":{"self":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/3301"}],"collection":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3301"}],"version-history":[{"count":7,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/3301\/revisions"}],"predecessor-version":[{"id":20358,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/posts\/3301\/revisions\/20358"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=\/wp\/v2\/media\/1094"}],"wp:attachment":[{"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3301"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3301"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.code-magagine.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3301"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}