In this post I will be very brief on the topic we need to do. As for more knowledge on sudo command and sudoers file follow the below link
Understanding syntax, arguments, aliases used in sudoers file with examples (visudo)
As per my knowledge there are two methods to do the same. I have tested these commands and methods in Red Hat Linux.
# visudo # Add an extra line in the last and make this entry deepak ALL=(ALL) ALL
Using this above line you are telling your Linux box to give full permission for user deepak on all the hosts and all the commands
[deepak@test ~]$ sudo /etc/init.d/network restart [sudo] password for test: Shutting down interface eth0: Device state: 3 (disconnected) [ OK ] Shutting down loopback interface: [ OK ] Bringing up loopback interface: [ OK ] Bringing up interface eth0: Active connection state: activated Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/1 [ OK ]
Add the user to wheel group
# usermod -G wheel deepak
Verify the same
# cat /etc/group | grep wheel wheel:x:10:root,deepak
Now uncomment this line from sudoers file
# visudo ## Allows people in group wheel to run all commands %wheel ALL=(ALL) ALL
The reason we did this because be default root is a member of wheel group so in case you want to give root level permission to any normal user then add him/her in wheel group.
$ sudo /etc/init.d/vsftpd restart Shutting down vsftpd: [ OK ] Starting vsftpd for vsftpd: [ OK ]
Please let me know your success and failures.