UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
View Poll Results: Which of the following uses of sudo do you prefer to gain root?
I use either sudo su root, sudo -s, sudo su -, or, if in a GUI (in the Alt+F2 run dialog):
Code:
gksudo gnome-terminal #or "kdesudo konsole"
which will simply run a terminal emulator window as root to start with. Sorry if this hasn't been included in the poll; I should have included this option.
Sudo was designed, in about 1980, to selectively allow non-root users to perform specific activities with root or another user's permissions. More recently, Ubuntu has used sudo as a kludge to prevent users from gaining root permissions, usually through su, and inadvertently continuing to run as root beyond performing the activity that needed the root permissions. This was envisioned as a way to prevent users unfamiliar with the POSIX permissions system from running unsecured.
Opinions vary as to whether this is good, bad or indifferent in practice. It can certainly mean more typing. Many experienced Unix/Linux administrators choose to circumvent Ubuntu's use of sudo, for this reason. Such administrators have learned to religiously relinquish root status as soon as they no longer need it.
To be clear, it is dangerous, as Windows users have found, to consistently run as root. But virtually any self-inflicted damage that can be done running under su can just as easily be done with sudo. Starting Firefox with "sudo firefox" is just as dangerous as running "firefox" while logged in as root. The only real difference is the ease with which a negligent user could do one or the other inadvertently. In other words, sudo is just another, more restrictive, (and some would say, more tedious), way to achieve root access in the case of Ubuntu. Sudo can be used in far more ways to selectively grant permissions on multi-user systems, however, than is dreamt of in Canonical's philosophy.
Last edited by Rambo_Tribble; 10-05-2010 at 08:24 AM.
I don't use any of the above methods for gaining root permissions I just use su like it was intended..... I believe that sudo in most distros is too liberal in its allowing specific users to run anything as sudo. In some cases it really is just pointless to have it there since a normal user can run anything with sudo thus making them a superuser anyway. Better to limit sudo to allowing users to run specific commands that a normal user may run and need elevated permissions. I find the only times I need super user access is when I am editing a file in /etc or doing kernel work.
Then again I am not your normal ubuntu user either so. I guess its better then creating them as a admin user.
I use "sudo bash" long enough to set a root password on a fresh install, then I use "su -" so I can have the shell environment the way I like it. But I've also been a *nix user & software developer since the early 1980s.
For the record, AFAIAC one password for both regular & root access is pseudo security.
Of course, your statement has merit, but there is a trade-off one must consider: When the password for the root account gets lost, and patches aren't made to the kernel and applications, security suffers as well. Since the root password gets used less than the user one, it is more likely to be lost or forgotten.
In a more perfect world, only computers would be allowed to use computers. Or something like that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.