Setting Permissions on a new kali user
Setting up permissions can get confusing, but it's really not. In general you need to do three things:
Create the User
useradd -d /home/someuser -s /bin/bash someuser
sudo mkdir /home/someuser
This will setup a new user "some user" with a home dir at /home/someuser/
and using bash as the default shell.
Set the user as a sudoer
visudo
This will open /etc/sudoers
in nano. If you have a different editor you could always use that. Add the following the file under the "root" entry.
someuser ALL=(ALL:ALL) ALL
Save the file, and now your new user someuser
is a sudoer.
Set the new user's password
To finalize this process, add a password for the user so they can sudo. If they want to change the password later they can with the sudo passwd
command.
sudo passwd someuser
-- then enter password && conf
Your new user now has the ability to sudo access the everything root can. You can event sudo su
to act as root. To test it out, logout of Kali as root and log back in as your new user. Or, just run su - someuser
and try sudoing.
Also - give your new user ownership of their home dir using chown -R someuser /home/someuser
Related videos on Youtube
Kawar
Updated on September 18, 2022Comments
-
Kawar over 1 year
What I would like to know in clear detail and easy to understand wording. How can I add permissions from the root account on kali(ARM) for a PI3. I also want my new account to have full permissions and sudo but I cant seem to understand how to set permissions or set sudo for it. I am trying to fix my sound and want to test it with a none root account.
-
0xSheepdog about 7 yearsWhat do you mean by "full permissions and sudo"? You want the new user to have permission to run any command with sudo, or are you referring to some other place for "full permissions"?
-
-
0xSheepdog about 7 yearsYou can also save some typing by using
-m
instead of-d /home/someuser
, if you want the new dir to be in BASEDIR (usually /home) and the new dir name to be the same as the username. -
Kawar about 7 yearsThis right here is what I wanted now let me try to make it work before I say thank you so if i get stuck I can still ask for help. to the person who asked what i mean by full permissions I mean so i do not need to be in root to do what I want like for example if I make an user in a Linux mint right from the start it can do every thing I want with out me setting any thing up. Thats all i want
-
Kawar about 7 yearsalso what do you mean bash? I am kind of basic to Linux I just love the UI and the lay out of kali is why I wanted to use that before you ask why I am using the distro that I am.
-
Kawar about 7 yearshey guys thank you I am about to test it and see if the stepped worked I think it did as it gave me no errors so lets see. ----- its working but its only trying to call one file for updating not the long long list of things whats wrong. and also I still do not have sound
-
iangolden almost 7 years@Kawar - Bash is the default shell used in the Kali ARM distribution. If you're unfamiliar, just google "bash" and "unix shells". To start acting as the new user on the Kali desktop, you'll have to logout and login at the start screen with your new username/pass. If this answered your question, please accept it as the correct answer.