<\/span><\/h3>\n\n\n\nOn Kali Linux, users must be members of the “sudo” group to get access to the sudo command line, which gives them administrative privileges. The “adduser” command can again be used to do this.<\/strong><\/p>\n\n\n\nBy default, the new user can’t use sudo, and will typicall get an error:<username> is not in the sudoers file.<\/em><\/p>\n\n\n\nThe error message is not very clear on how to fix it, but on Kali Linux is pretty straightforward, the only thing you need is to add the new user to the “sudo” group.<\/p>\n\n\n\n
Make sure you’re still logged in with the main user (not the new one), and follow this command syntax:sudo adduser <username> sudo<\/code><\/p>\n\n\n\nSo, with my previous example, it would be:sudo adduser infosecscout sudo <\/code>Obviously, this must be done by a user with administrative privileges.<\/p>\n\n\n\n <\/figure>\n\n\n\nOnce done, logout from your main user session, and try again from the new user session. It should be fine after that: <\/p>\n\n\n\n
If you have access to the GUI, you can even do it from the system settings, check the next question for more details.<\/p>\n\n\n\n
<\/span>How to add a new user to a specific group?<\/span><\/h3>\n\n\n\nOn Kali Linux users can be added to a group either by using the adduser command (sudo adduser <user> <group>), or via the “Users & groups” settings from the GUI.<\/strong><\/p>\n\n\n\nI showed you how to do it in command lines in the previous question (you can replace “sudo” with any other group), but the easiest way on Kali is probably to use the GUI:<\/p>\n\n\n\n
\nOpen the system settings, and find the “Users and groups” item.<\/li>\n\n\n\n Under the list of users, click on “Manage groups”: <\/li>\n\n\n\n A list with all the system groups shows up, find the group you want to edit (“sudo” for example), and select it.<\/li>\n\n\n\n Then click on “Properties” to see the groups members: <\/li>\n\n\n\n In the new window, you’ll see the group name, id and members. You can simply check\/uncheck any user to add or remove them from the group.<\/li>\n<\/ul>\n\n\n\nI wish it was this easy in other distributions, but anyway, creating a new user and managing its permissions is not that complicated in Kali Linux, and now you know how to do it in two different ways :-).<\/p>\n","protected":false},"excerpt":{"rendered":"
Oddly enough, Kali Linux is a security-oriented distribution, but it comes with a default login and password. You will need to harden it a bit after the initial installation. You can always change the password or even set a different user name. But it’s also possible to create a new one. Here is how to…<\/p>\n","protected":false},"author":1,"featured_media":1544,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[16],"tags":[],"taxonomy_info":{"category":[{"value":16,"label":"Kali Linux"}]},"featured_image_src_large":["https:\/\/infosecscout.com\/wp-content\/uploads\/2024\/02\/add-user-kali-linux-1024x683.jpg",1024,683,true],"author_info":{"display_name":"Patrick Fromaget","author_link":"https:\/\/infosecscout.com\/about\/"},"comment_info":0,"category_info":[{"term_id":16,"name":"Kali Linux","slug":"kali-linux","term_group":0,"term_taxonomy_id":16,"taxonomy":"category","description":"Jump into our Kali Linux Tutorials. They're perfect for getting the hang of this cool Linux distribution. We make it easy to learn the basics and a bit more!","parent":0,"count":37,"filter":"raw","cat_ID":16,"category_count":37,"category_description":"Jump into our Kali Linux Tutorials. They're perfect for getting the hang of this cool Linux distribution. We make it easy to learn the basics and a bit more!","cat_name":"Kali Linux","category_nicename":"kali-linux","category_parent":0}],"tag_info":false,"_links":{"self":[{"href":"https:\/\/infosecscout.com\/wp-json\/wp\/v2\/posts\/1528"}],"collection":[{"href":"https:\/\/infosecscout.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/infosecscout.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/infosecscout.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/infosecscout.com\/wp-json\/wp\/v2\/comments?post=1528"}],"version-history":[{"count":5,"href":"https:\/\/infosecscout.com\/wp-json\/wp\/v2\/posts\/1528\/revisions"}],"predecessor-version":[{"id":1545,"href":"https:\/\/infosecscout.com\/wp-json\/wp\/v2\/posts\/1528\/revisions\/1545"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/infosecscout.com\/wp-json\/wp\/v2\/media\/1544"}],"wp:attachment":[{"href":"https:\/\/infosecscout.com\/wp-json\/wp\/v2\/media?parent=1528"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/infosecscout.com\/wp-json\/wp\/v2\/categories?post=1528"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/infosecscout.com\/wp-json\/wp\/v2\/tags?post=1528"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}