Can you have "sudo" automatically added to each line in the CLI?
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.
I know I'm going to get howled down and set on fire for what I'm about to say, but the easiest way to do what you want to do is to simply assign a password to the root account.
When you know you need to a do a heap of things as root, just become root and do them. Much easier in my worthless opinion.
Ubuntu systems HATE having their root password set. Last time I tried that the necessary tweaking to get everything to work again was enough to make me reverse my position about setting the root password in Ubuntu.
If you want to learn from experience (not reccommended) use $ sudo passwd, or maybe it was $ sudo passwd root... I can't remember.
In short: deal with the sudo thing. Setting the root password isn't worth it. Also, you might consider adding yourself to the group root. I tried it, and now I can open Synaptic, KPackage, and Adept without needing to type a password.
I'm starting to like the sudo thing a lot. I feel safe using my computer all the time. Whereas when I'm using my ms box, I'm always nervous about spyware or virus notifications and such.
Yah, I do miss all the virus and malware... Using the computer just isn't as exciting and dangerous as it used to be before I switched to Linux. I hear that virus writers don't support Linux yet... pity. They don't even support Wine. What a bummer!
I think I'll write a linux virus now: $ sudo rm -rf /
Oh, wait. That'll only work on Ubuntu workstations... and you have to input your root password... man, we Linux people miss out on a lot of the fun, don't we?
Ubuntu systems HATE having their root password set. Last time I tried that the necessary tweaking to get everything to work again was enough to make me reverse my position about setting the root password in Ubuntu.
If you want to learn from experience (not reccommended) use $ sudo passwd, or maybe it was $ sudo passwd root... I can't remember.
In short: deal with the sudo thing. Setting the root password isn't worth it. Also, you might consider adding yourself to the group root. I tried it, and now I can open Synaptic, KPackage, and Adept without needing to type a password.
Hope you find something that works for you!
Its fairly easy to setup a root account and have things work properly. You could do
Code:
$sudo passwd root
After that you can then disable sudo by running visudo as root and commenting out the section that allows all users in the admin group to run all system commands. This method has always worked fine for me. If you set a root password and still keep using sudo, I have noticed that some apps will ask you for your password instead of roots password (which may or may not be desirable), so I prefer disabling sudo and going with the classical root account.
binary_y2k2 has good suggestions, so try those first before changing to a classical root account.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.