{"id":10199,"date":"2018-12-17T10:45:03","date_gmt":"2018-12-17T09:45:03","guid":{"rendered":"http:\/\/www.b.shuttle.de\/hayek\/hayek\/jochen\/wp\/blog-en\/?p=10199"},"modified":"2018-12-17T10:45:03","modified_gmt":"2018-12-17T09:45:03","slug":"usermod-how-to-grant-sudo-privileges-to-an-account","status":"publish","type":"post","link":"https:\/\/wp.jochen.hayek.name\/blog-en\/2018\/12\/17\/usermod-how-to-grant-sudo-privileges-to-an-account\/","title":{"rendered":"Linux: how to grant &#8220;sudo&#8221; privileges to an account: &#8220;usermod&#8221;"},"content":{"rendered":"\n\t\t\t\t\n\t\t\t\t\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/manpages.debian.org\/unstable\/passwd\/usermod.8.en.html\">https:\/\/manpages.debian.org\/unstable\/passwd\/usermod.8.en.html<\/a><\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">CAVEAT: Do not edit any file for gaining the required effect, instead: use the following command line!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ sudo usermod --append --groups sudo ACCOUNT<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Actually it adds (&#8220;&#8211;append&#8221;) <em>ACCOUNT<\/em> to a user group by the name of <em>sudo<\/em>. That works because of this entry in the file <em>\/etc\/sudoers<\/em>\u00a0(what is the group <em>sudo<\/em> allowed to do?):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>%sudo ALL=(ALL:ALL) ALL<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In other Linux distributions the group is named&nbsp;<em>administrators<\/em>&nbsp;instead, that would effect the <em>usermod<\/em> command line and the entry in <em>\/etc\/sudoers<\/em>.<\/p>\n\t\t\t\t","protected":false},"excerpt":{"rendered":"<p>https:\/\/manpages.debian.org\/unstable\/passwd\/usermod.8.en.html CAVEAT: Do not edit any file for gaining the required effect, instead: use the following command line! Actually it adds (&#8220;&#8211;append&#8221;) ACCOUNT to a user group by the name of sudo. That works because of this entry in the file \/etc\/sudoers\u00a0(what is the group sudo allowed to do?): In other Linux distributions the group [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_share_on_mastodon":"0"},"categories":[769,306,845,671],"tags":[1328],"class_list":["post-10199","post","type-post","status-publish","format-standard","hentry","category-debian","category-linux","category-system-administration","category-unix","tag-sudo"],"share_on_mastodon":{"url":"","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paO0kP-2Ev","jetpack_likes_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/10199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/comments?post=10199"}],"version-history":[{"count":0,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/posts\/10199\/revisions"}],"wp:attachment":[{"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/media?parent=10199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/categories?post=10199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.jochen.hayek.name\/blog-en\/wp-json\/wp\/v2\/tags?post=10199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}