{"id":110,"date":"2019-04-20T17:42:19","date_gmt":"2019-04-20T08:42:19","guid":{"rendered":"https:\/\/www.lapidem.pw\/?p=110"},"modified":"2019-04-20T17:42:19","modified_gmt":"2019-04-20T08:42:19","slug":"debian-password-sudo-su-superuser","status":"publish","type":"post","link":"https:\/\/www.lapidem.pw\/wordpress\/?p=110","title":{"rendered":"Debian\u3067\u3001\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u305b\u305a\u306bsudo su\u3067\u30b9\u30fc\u30d1\u30fc\u30e6\u30fc\u30b6\u306b\u306a\u308b\u3002"},"content":{"rendered":"\n<p>\u7ba1\u7406\u3092\u59d4\u8a17\u3057\u3066\u3044\u308b\u30b5\u30fc\u30d0\uff08\u696d\u52d9\u7528\uff09\u306eOS\u306f\u3001CentOS, Ubuntu, SunOS\u304c\u3042\u308b\u3002Lapidem\u304c\u7acb\u3061\u4e0a\u3052\u305f\u30b5\u30fc\u30d0\u306f\u3001\u99b4\u67d3\u307f\u306e\u3042\u3063\u305fUbuntu\u3060\u3063\u305f\u304c\u3001\u30b5\u30fc\u30d0\u3092\u65b0\u8a2d\u3059\u308b\u6642\u306b\u696d\u8005\u304cCentOS\u306b\u3057\u305f\u3044\u3068\u8a00\u3063\u3066\u6765\u305f\u306e\u3067\u3001\u4e8c\u3064\u8fd4\u4e8b\u3067CentOS\u306b\u3057\u305f\u3002\u30d7\u30e9\u30a4\u30d9\u30fc\u30c8\u3067\u306fCentOS\u3092\u4f7f\u3063\u3066\u3044\u306a\u304b\u3063\u305f\u306e\u3067\u3001\u3042\u307e\u308a\u6c17\u306b\u3057\u3066\u3044\u306a\u304b\u3063\u305f\u304c\u3001\u3042\u308b\u6642\u3001sudo su\u3067\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u305b\u305a\u306b\u30b9\u30fc\u30d1\u30fc\u30e6\u30fc\u30b6\u306b\u306a\u308c\u308b\u3053\u3068\u306b\u6c17\u3065\u3044\u305f\u3002<\/p>\n\n\n\n<p>\u306a\u3093\u3060\u304b\u3001\u5371\u306a\u3044\u8a2d\u5b9a\u304c\u3055\u308c\u3066\u3044\u308b\u306a\u3068\u601d\u3063\u305f\u304c\u3001\u7ba1\u7406\u4f5c\u696d\u3092\u30d8\u30d3\u30fc\u306b\u3057\u3066\u3044\u308b\u6642\u306b\u306f\u3001\u30b9\u30fc\u30d1\u30e6\u30fc\u30b6\u306e\u307e\u307e\u3067\u4f5c\u696d\u3059\u308b\u3088\u308a\u3082\u3001\u3053\u3061\u3089\u306e\u65b9\u304c\u5b89\u5168\u3067\u697d\u3002sudo \u301c\u3067\u3001\u3044\u3061\u3044\u3061\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u5165\u529b\u3057\u306a\u304f\u3066\u6e08\u3080\u5206\u3001\u4f5c\u696d\u306f\u52b9\u7387\u7684\u306b\u306a\u308b\u3002\u30bb\u30ad\u30e5\u30a2\u306a\u74b0\u5883\u3067\u4f5c\u696d\u3067\u304d\u308b\u306e\u3067\u3042\u308c\u3070\u3001\u52b9\u7387\u3092\u4e0a\u3052\u308b\u305f\u3081\u306b\u8a31\u305b\u308b\u8a2d\u5b9a\u3068\u3044\u3046\u3053\u3068\u3067CentOS\u3067\u306f\u6b8b\u3057\u3066\u3042\u308b\u304c\u3001Debian\u7684\u306b\u306f\u8a31\u305b\u306a\u3044\u306e\u304b\u3082\u3002<\/p>\n\n\n\n<p>Debian\u306b\u306f\u3001\/etc\/sudoers\u306bdefault\u3067\u306f\u306a\u3044\u8a2d\u5b9a\u3060\u304c\u3001CentOS\u306e\/etc\/sudoers\u3067\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3055\u308c\u3066\u3044\u308b\u8a2d\u5b9a\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#usermod -aG sudo <em>user_name<\/em><br>#visudo<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># Allow members of group sudo to execute any command<br> %sudo &nbsp; ALL=(ALL:ALL) ALL<\/pre>\n\n\n\n<p>\u306e\u4e0b\u306b\u3001\u2193\u3092\u8ffd\u52a0\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">##### incorporated from CentOS setting<br>##### Same thing without a password<br> %sudo &nbsp; ALL=(ALL:ALL) NOPASSWD:ALL <\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">$sudo su<br>root# \u30d1\u30b9\u30ef\u30fc\u30c9\u5165\u529b\u3092\u305b\u305a\u306b\u30b9\u30fc\u30d1\u30fc\u30e6\u30fc\u30b6\u306b\u306a\u3063\u305f\u3053\u3068\u3092\u78ba\u8a8d<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7ba1\u7406\u3092\u59d4\u8a17\u3057\u3066\u3044\u308b\u30b5\u30fc\u30d0\uff08\u696d\u52d9\u7528\uff09\u306eOS\u306f\u3001CentOS, Ubuntu, SunOS\u304c\u3042\u308b\u3002Lap &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,8,2],"tags":[11,12,15,22,23],"class_list":["post-110","post","type-post","status-publish","format-standard","hentry","category-centos","category-debian-linux","category-linux","tag-centos","tag-debian","tag-linux","tag-su","tag-sudo"],"_links":{"self":[{"href":"https:\/\/www.lapidem.pw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/110","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lapidem.pw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lapidem.pw\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lapidem.pw\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lapidem.pw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=110"}],"version-history":[{"count":0,"href":"https:\/\/www.lapidem.pw\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/110\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.lapidem.pw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=110"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lapidem.pw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=110"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lapidem.pw\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=110"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}