{"id":65329,"date":"2023-12-15T09:21:22","date_gmt":"2023-12-15T09:21:22","guid":{"rendered":"https:\/\/xeyecs.com\/xeyeacademy\/?p=65329"},"modified":"2026-08-15T09:22:05","modified_gmt":"2026-08-15T09:22:05","slug":"change-users-passwords-on-kali-linux-very-important-for-linux-beginners","status":"publish","type":"post","link":"https:\/\/xeyecs.com\/xeyeacademy\/change-users-passwords-on-kali-linux-very-important-for-linux-beginners\/","title":{"rendered":"Change Users Passwords on Kali Linux &#8211; Very Important for Linux Beginners"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">As always said, never leave your system with the default credentials as it is very very critical, it is a must as a Cybersecurity student or a specialist not to leave any of your systems with default usernames and passwords, professional hackers check all of their targets systems default credentials as a first step of their malicious attempts, and if they managed to find one of your systems with its default credentials, it is a game over.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this blog, and in the context of not leaving the default credentials on our systems, we are just going to learn how to change the password for Kali and it is applicable for any user, by the way, Kali user by default is in the sudoer file so it can run commands as root user just by typing the sudo command right before the required command in the command line and we just need to enter the Kali password, and for example if another hacker gain access to your device and they entered the default password for Kali by using sudo command, he will fully compromise your whole Kali system easily.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Steps and methods of Changing the default password on Kali Linux:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The command that we are going to use to change the password for users is&nbsp;<strong>passwd<\/strong>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1) Open the terminal quickly by pressing at once on the left ctrl button, left Alt button, and the letter T on your keyboard. 2) As shown in the below screenshot, just type the&nbsp;<strong>passwd&nbsp;<\/strong>command or also enter the name of the user, which is Kali in our case here as &#8220;passwd kali&#8221;. 3) Enter the current default password which is Kali, then press enter. 4) Enter the required new password, then press enter, retype it then press enter again. Now the password for Kali has changed, make sure that you set a strong password:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/payhip.com\/cdn-cgi\/image\/format=auto\/https:\/\/pe56d.s3.amazonaws.com\/o_1hhnn3qfmbka1qsu1tlr1s2fh21c.png\" alt=\"a screenshot that shows the password change command for kali\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The Kali user is in the sudoers file, which can have the highest privilege just by running the&nbsp;<strong>sudo&nbsp;<\/strong>command right before the actual command and then could act as a root user in most cases.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Sudo&nbsp;<\/strong>is the short name for Super User Do, we have learned that we can change the password for users using the passwd command and we did for Kali users, however if we wanted to change other users&#8217; passwords while we logged in as Kali user, we can\u2019t just use&nbsp;<strong>passwd&nbsp;<\/strong>command, we need to use&nbsp;<strong>sudo&nbsp;<\/strong>command right before the&nbsp;<strong>passwd&nbsp;<\/strong>command to have the privilege to change the passwords for other users like root user can do.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s first change the password for the root for better security:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the below screenshot, we typed the&nbsp;<strong>sudo&nbsp;<\/strong>command and then&nbsp;<strong>passwd&nbsp;<\/strong>and if we didn\u2019t specify any other user after&nbsp;<strong>passwd&nbsp;<\/strong>then this is going to change the password for the root user without stating the root user because once we run the&nbsp;<strong>sudo&nbsp;<\/strong>command, the command line will run as the root user, we can also state root, like &#8220;<strong>sudo passwd root<\/strong>&#8221; and it will work to change the password for the root user, but to be performed quicker, we are just going to use&nbsp;<strong>sudo&nbsp;<\/strong>and&nbsp;<strong>passwd&nbsp;<\/strong>and it will also change the password for the root user.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/payhip.com\/cdn-cgi\/image\/format=auto\/https:\/\/pe56d.s3.amazonaws.com\/o_1hhno1kdj1gcjukb1o771i7s74ic.png\" alt=\"change the root password - XEye Academy\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now let&#8217;s change the password for a standard user from Kali, so we need to create that user as we don&#8217;t have users on our system for now, to create a new user, we will use a command named&nbsp;<strong>adduser<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As shown in the below screenshot, 1) Enter sudo because adding users requires the highest privilege, then&nbsp;<strong>adduser&nbsp;<\/strong>command and the new username, which in this example&nbsp;<strong>testuser<\/strong>. 2) Enter the new password. 3) Enter all the required details(optional) and confirm with a yes answer with the&nbsp;<strong>Y&nbsp;<\/strong>option. Now you have a new user called testuser as per the screenshot below:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/payhip.com\/cdn-cgi\/image\/format=auto\/https:\/\/pe56d.s3.amazonaws.com\/o_1hhnog4sj159fvf61fi1t851h3io.png\" alt=\"adduser - XEye Academy\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now let&#8217;s change the password for that user using the&nbsp;<strong>passwd&nbsp;<\/strong>as we learned above, so as shown in the below screenshot, 1) we use the&nbsp;<strong>sudo&nbsp;<\/strong>command to have the root privilege as Kali is in the sudoers file. 2) we use the&nbsp;<strong>passwd&nbsp;<\/strong>command and then state the target user which is the testuser. 3) press enter then enter the new password, and retype it. Now the password for the testuser is changed using the&nbsp;<strong>passwd&nbsp;<\/strong>while we are logged in as Kali:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/payhip.com\/cdn-cgi\/image\/format=auto\/https:\/\/pe56d.s3.amazonaws.com\/o_1hhnouk126u9139of121e1q66su.png\" alt=\"passwd with standard user - XEye Academy\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now you might need to delete that user, as shown below screenshot, 1) First, we need to make sure that all the processes that are running for that user are killed(stopped running), so we run this command \u201c<strong>sudo killall -u testing<\/strong>\u201d,&nbsp;<strong>killall&nbsp;<\/strong>command to kill all the processes,&nbsp;<strong>-u<\/strong>&nbsp;to specify the target user. 2) We run the userdel command to delete the user, \u201c<strong>sudo userdel testuser<\/strong>\u201d, after the&nbsp;<strong>userdel&nbsp;<\/strong>command we need to specify the target user.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/payhip.com\/cdn-cgi\/image\/format=auto\/https:\/\/pe56d.s3.amazonaws.com\/o_1hhnp698516rcv581gjclr81egm14.png\" alt=\"killall and userdel command - XEye Academy\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Now the user is deleted. As a hacker, if you for example obtain access to your target Linux system and get the password for Kali or any other user in the sudoers file, you can from many many post-exploitation scenarios delete almost all the users on your target Linux system, cause Denial of Service (DOS), or you can add too many bogus users that can fill their system space.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now you have learned how to change the password for any user, and create and delete user accounts on your Kali system, you have learned that any user in the sudoers file like a Kali user can have almost the privileges of the root user by using the&nbsp;<strong>sudo&nbsp;<\/strong>command.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you want to become a Linux expert and learn all the tricks that are used by advanced hackers,&nbsp;<strong><a href=\"https:\/\/academy.xeyecs.com\/contact\" target=\"_blank\" rel=\"noreferrer noopener\">contact us<\/a><\/strong>&nbsp;for private training with one of our certified experts along with dedicated and advanced real-world simulating labs, also you can check our&nbsp;<strong><a href=\"https:\/\/academy.xeyecs.com\/online-training\" target=\"_blank\" rel=\"noreferrer noopener\">Online Training courses<\/a>,&nbsp;<\/strong>and also you can enroll for free in our recorded course designed for Ethical Hacking beginners which are named&nbsp;<strong><a href=\"https:\/\/academy.xeyecs.com\/b\/introduction-to-ethical-hacking\" target=\"_blank\" rel=\"noreferrer noopener\">The Optimum Introduction to Ethical Hacking<\/a><\/strong>, it will make you fully understand the core basics of Ethical Hacking and help you to become an expert.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As always said, never leave your system with the default credentials as it is very very critical, it is a must as a Cybersecurity student or a specialist not to leave any of your systems with default usernames and passwords, professional hackers check all of their targets systems default credentials as a first step of<a href=\"https:\/\/xeyecs.com\/xeyeacademy\/change-users-passwords-on-kali-linux-very-important-for-linux-beginners\/\" class=\"more-link\"><span class=\"screen-reader-text\">Change Users Passwords on Kali Linux &#8211; Very Important for Linux Beginners<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":65330,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[288,289],"tags":[291,292],"class_list":["post-65329","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux-security","category-user-management-passwords","tag-kali-linux","tag-linux-beginners"],"_links":{"self":[{"href":"https:\/\/xeyecs.com\/xeyeacademy\/wp-json\/wp\/v2\/posts\/65329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xeyecs.com\/xeyeacademy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xeyecs.com\/xeyeacademy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xeyecs.com\/xeyeacademy\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/xeyecs.com\/xeyeacademy\/wp-json\/wp\/v2\/comments?post=65329"}],"version-history":[{"count":1,"href":"https:\/\/xeyecs.com\/xeyeacademy\/wp-json\/wp\/v2\/posts\/65329\/revisions"}],"predecessor-version":[{"id":65331,"href":"https:\/\/xeyecs.com\/xeyeacademy\/wp-json\/wp\/v2\/posts\/65329\/revisions\/65331"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/xeyecs.com\/xeyeacademy\/wp-json\/wp\/v2\/media\/65330"}],"wp:attachment":[{"href":"https:\/\/xeyecs.com\/xeyeacademy\/wp-json\/wp\/v2\/media?parent=65329"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xeyecs.com\/xeyeacademy\/wp-json\/wp\/v2\/categories?post=65329"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xeyecs.com\/xeyeacademy\/wp-json\/wp\/v2\/tags?post=65329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}