[Leaplist] sudo vs su
Dan Trevino
dantrevino at wrevolution.org
Tue Jun 9 11:08:27 EDT 2009
On Mon, Jun 8, 2009 at 11:13 PM, John Simpson<jms1 at jms1.net> wrote:
> On 2009-06-01, at 1101, Richard F. Ostrow Jr. wrote:
>>
>> su - input not logged, difficult to backtrace what was done in the event
>> of a catastrophic screwup (rm -rf /)
>>
>> sudo - can easily track what was done. Everything put into sudo goes into
>> /var/log/{hostname}/messages of the remote logging system. An 'rm -rf /'
>> would be logged on the remote machine, and I would know *exactly* who was
>> stupid enough to do such a thing, and can make them clean up the mess.
>>
>> I wonder which one is better from an SA standpoint?
>
> my job involves administering about 100 linux machines. here's one thing i
> personally like about "sudo"...
>
> my non-root account uses tcsh, with a customized set of aliases and a
> visually distinctive prompt (so i can tell where the commands are when
> scrolling back up in a window.) even if root uses an un-modified bash with
> the boring "[hostname] #" prompt, if i log into my own account and do "sudo
> -s", it makes me root, running tcsh, using the .tcshrc from my non-root
> user's home directory, which gives me all of my aliases and the special
> prompt, only running as root. this is because "sudo" doesn't re-write the
> HOME and/or SHELL variables.
>
what is the difference between running 'sudo -s' or 'sudo -i' in this case?
dan
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the Leaplist
mailing list