Sunday, February 21, 2016

User Privilege Specifications for new or first user on Linux system

If you recently installed Linux (Debian) on your system and created a new user using command
sudo adduser <newuser>

And if this being the first user under the default root user you might need to give proper privileges to the new user.
To do so, you need to edit this file visudo, use the below command.
sudo visudo
append this line in the file visudo.
#User Privilege Specification
root    ALL=(ALL:ALL) ALL
newuser    ALL=(ALL:ALL) ALL
Then save this using ctrl+x and type "Y" and then press Enter.

######################
create new directory inside home directory of your new user
sudo mkdir -p /home/<directory-name>

create a new file inside any diretory
sudo vim filename

No comments:

Post a Comment