[sudo-users] (correction) How to use sudo without typing sudo before any command
David Ledger
david.ledger at ivdcs.co.uk
Fri Jun 12 20:20:14 EDT 2009
At 08:34 -0400 5/6/09, Justin Alcorn wrote:
>The point of sudo is to make sure you know you're running a privileged
>command, and to log those commands. To not type 'sudo', you become
>root, but then you lose all the benefits of sudo, including the
>logging.
>
>On Fri, Jun 5, 2009 at 8:20 AM, Vijay Lad<vijay.k.lad at gmail.com> wrote:
>> Hi All,
>> I am very new user for sudo, I have install the sudo on my centos &
>> its working fine. The problem is that, I have to enter sudo before running
>> any command. Is ther any way where I can enter sudo at start & after that I
>> can run any command without typing sudo before command?
There must be lots of people using sudo to run individual commands as
root, but in by experience, across many companies, sudo is mainly
used in the way Vijay wants. Other uses have been to allow specific
users to run something as 'oracle' and, 9 years ago, to mount a CD as
root.
I use the alias
soot='sudo -p "Password: " -H -- /bin/ksh -o vi'
in my own environment, which shows how to do it. Using it this way is
useful for allowing SysAdmins to work without passing out the root
password, which remains in a safe for use in emergencies.
(I just copy pasted my alias in there, forgetting that I have a link
on my PATH called '-ksh' to /bin/ksh, which starts a ksh as a login
shell).
David
--
David Ledger - Freelance Unix Sysadmin in the UK.
HP-UX specialist of hpUG technical user group (www.hpug.org.uk)
david.ledger at ivdcs.co.uk
www.ivdcs.co.uk
More information about the sudo-users
mailing list