On Thu, Nov 4, 2010 at 12:41 AM, JAGANADH G <[email protected]> wrote:

> Dear All
>  "sudo yum search mysqldb"
> "su -c 'yum search mysqldb'"
>
> which one is correct.
>
>
That depends on the situation. Sudo is used when you don't know root
password but you are nevertheless authorised by the 'root' to do all his
duties. This is helpful in some situations; for example say you left the
organisation, its enough to remove your account.  Root password need not be
changed!

But for su to work you need root password! It is used by superuser himself
to gain root privileges if and when required when he is logged in using his
normal account.


>  When I use the first one it says
> [user] is not in the sudoers file.  This incident will be reported.
>

Meaning you are not authorised to perform administrative duties. This, of
course, looks silly in personal computers where you typically know root
password but created a new account and forgot to add that username to
sudoers file. [The user created during install is in sudoers file by
default]

-- 
*அகிலன்* (Akilan R)
(http://www.coding-aviator.blogspot.com)
*I should have no use for a paradise in which I should be deprived of the
right to prefer hell.*
  --Jean Rostand
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to