Kali Linux- To Add user

#Simple one
adduser aashish

#Add a Non-root User if You’re Not Comfortable Running as root

Method 1 – The command to use here is called useradd. The m option instructs the script to create the user’s home directory, while the G option is used to add the user to existing groups. In the following command, the user is added to the sudo group to give it access to system-level commands via the sudo command. useradd -m USERNAME -G sudo -s /bin/bash. Replace USERNAME with your choice of login name.

After that, specify a password for the user with passwd USERNAME. You’ll be prompted to specify and verify a password. Again, replace USERNAME with your choice of login name.




Just add the user to the sudo group:

sudo adduser <username> sudo


The change will take effect the next time the user logs in.

This works because /etc/sudoers is pre-configured to grant permissions to all members of this group (You should not have to make any changes to this):

# Allow members of group sudo to execute any command
%sudo   ALL=(ALL:ALL) ALL


Reactions: