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:-
- Use the command below to edit the sudoer list
- Go thru the sudoer list and look for this line:-
1root ALL=(ALL) ALL
- To add user ‘techie’ in the sudoer list, i need to add a line below root.
1techie ALL=(ALL) ALL
- So the final view will be
12root ALL=(ALL) ALLtechie ALL=(ALL) ALL