Security management
Managing users in Kali is not an everyday task, but you will probably use it occasionally. Personally, I rarely use the following commands, but sometimes, you might need to handle user management:
- To
add
a user withsudo
capabilities in Kali, use the following command:
useradd -m [username] -G sudo -s /bin/bash
- If you're logged in and you want to elevate your privilege to a root user, try this command:
su - [desired root user name]
- If you're logged in and you want to
execute
a root command, use the following:
sudo [application name]
- To change the root (or any user's) password, use the following:
passwd [user name]
- The
shadow
file is important in Kali, because it stores the hashed passwords and some useful information about users. For example, I created a user calledgus
on Kali, so, to get his information, I should execute the following command:
ls /etc/shadhow | grep gus #output gus:$6$mNP6T4jA$sn0eAgo7o1pjSUxe6loigq1wWhC4agpWpWopv0mVBr2V21ZfU./hAMPJTO/7Ecajd0SVozLGwDOrc37hN1ktL0...