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
How to give permission to user to run some commands in Linux
As per my knowledge there are two methods to do the same. I have tested these commands and methods in Red Hat Linux.
Method 1
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
Method 2
Add the user to wheel group
Verify the same
Now uncomment this line from sudoers file
How to give permission to user to run some commands in Linux
As per my knowledge there are two methods to do the same. I have tested these commands and methods in Red Hat Linux.
Method 1
# 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
Follow the below links for more tutorials
Multiple connections to a server or shared resource by same user
How to extract files to different directory using tar in Unix/Linux
How to preserve Symbolic links with tar command in Unix/Linux
How to give permission to user to run some commands in Linux
How to set environment (PATH) variable permanently in Linux
How to mount windows share on linux
How to extract files to different directory using tar in Unix/Linux
How to preserve Symbolic links with tar command in Unix/Linux
How to give permission to user to run some commands in Linux
How to set environment (PATH) variable permanently in Linux
How to mount windows share on linux
How to do Ethernet/NIC bonding/teaming in Red Hat Linux
How to install/uninstall/upgrade rpm package with/without dependencies
How to install/uninstall/upgrade rpm package with/without dependencies