Login as root is a very bad practice. Thus, it’s good to implement sudo in Linux system. You can add user to sudo list, so the user in the sudoer list will be able to perform task in different privilege.
sudo is a program in the Unix / Linux that allow a user to execute command with the security privileges of another user (usually it’s superuser or root)
To add a user to sudoer list in linux, follow the steps below:-
Advertisements
- Use the command below to edit the sudoer list
visudo
- Go thru the sudoer list and look for this line:-
root ALL=(ALL) ALL
- To add user ‘techie’ in the sudoer list, i need to add a line below root.
techie ALL=(ALL) ALL
- So the final view will be
root ALL=(ALL) ALL techie ALL=(ALL) ALL
Related posts:
How to loop thru directory files in bash shell
How to avoid duplicate content using .htaccess
How to change system date in Linux
How to move cursor to end of line in vi editor
Debian: "There is no public key available for the following key IDs"
How to check Linux distribution and version?
How to add Primary and Secondary DNS server - /etc/resolve.conf - Linux
How to show line number in vi / vim editor
Share this with your friends:-
You can set no password when sudo to other user.
techie ALL=(ALL) NOPASSWD: ALL