Monday, 16 December 2013

How to give a user sudo access

Hello friends I am Deepak Saini and I am trying to explain you how to give super user privileged to a user .
Some Important things .
1  Sudo privileged  is given to a user to access super user privileged
2  We are never give full access  to a super user in companies .

The file in which we are makes changes
:-  /etc/sudoers

Start now

1 Open the sudoer file in the vim editor .
   syntax :- vim /etc/sudoers

In this file we are change or insert the line no 89 according to our user
   In line 88 we see the root permissions  all all see in the image.

In this imgae you see how i am use the /sbin/fdisk to give the permissions to the user which one name is ds 
i use NOPASSWD because when we use the  fdisk or other  command which we are gives sudo privileged
the user enter the password every time so i use this and now not need of password every time of executing command . And i give the command path /sbin/fdisk because without it we can't give the sudo privileged properly work.
    If we want  User execute all commands but not able to execute the fdisk command so we little change in the entry like this ALL,!/sbin/fdisk here ! is the banned sing or symbol .
    And after this user execute all the command but not able to execute the fdisk command.So this is the method how you give the sudo privileged to a user


Thanks for reading and Sorry for R.I.P english ._/\_ :)


0 comments:

Post a Comment