Saturday, June 29, 2013

SUDO - Super User Doer


SUDO (Super User Do ) 
               --------------------------------

SUDO  : - 'Super user doer' is a process that gives Admin.(root) power to a local user and that can be
       full permission or some limeted permission that depand on "root". Root can give any permission
       to its local user.

step 1. creat a user first to provide the 'sudo' power

#adduser  tom

#passwd   tom  (either we can give password or without to our sudo user
XXXX

#passwed -d  tom  ( user without password )

step 2. #visudo  (write this command and press enter to make entry in 'visudo'file)

(go to the end of this file , simly press 'Shift + g' )

"%tom  ALL = /sbin/init 0, /sbin/init 6, /sbin/ifconfig , /sbin/adduser"
[write this line for some limited permission]

"%tom  ALL=(ALL) ALL"
[write this line to give the full permission to a user]

:wq   (save the file and exit )

#which  command   [ to search the path of the command ]

#whereis command  [ to search the path of the command ]

#locate  command  [ to search the exact location of the command]

step 3. (Login by the user "tom" and write these command by the help of 'sudo' command )

tom$]sudo  /sbin/init 6

password: XXX

tom$]sudo  /sbin/adduser  herry

password: XXX

=======================================================================

No comments:

Post a Comment