I'm getting annoyed by having to use sudo on my Ubuntu machine. The following are some of the reasons why:

  1. I open some file owned by root, but I forget to open it with sudo. Now, I make a bunch of changes to the file, only to realize at the end when I try to save it that I can't. Now I have to re-open the file with sudo, and re-apply all my changes.
  2. I want to move some files via nautilus, but I don't realize they're owned by root. An error dialog pops up, and again, I have to re-open nautilus with gksudo. This in general applies to all GUI applications.
  3. Lets say I install MySQL, and I want to view some of its config files. Because of file permissions, I'm unable to view the files or sometimes even enter the directory, unless I become the MySQL user or root (doing something like "sudo cd [path]" doesn't work).

I want to change this situation so that its more like Windows XP (right now its like Windows Vista UAC crap), where I can basically do whatever I want with my machine. Yes, yes, I realize even on Windows XP there were certain important system files which you couldn't modify, but its still a hell of a lot better than the Ubuntu situation. And yes, I realize its more insecure, but I frankly don't care (I'm adult enough to take responsibility for my choices should s**t hit the proverbial fan).

Things I've already tried (or were suggested by other members):

  1. Removing the sudo password: not bad, but I still have to remember to prefix commands with sudo
  2. Making the time-out really long: same as above
  3. Alias commands: now I don't have to remember to prefix sudo so often, but it'll get tiresome having to constantly alias new commands
  4. Add myself to the appropriate groups - good idea, didn't think of it myself; however, it'll get tiresome having to contantly add myself to new groups

Ideas I have, but don't know if they will work or how to make them work:

  • Launch the original gnome-session with sudo (i.e., "sudo gnome-session"), and combine it with point #1 and #2 above. Since all other processes started will be child processes of the original gnome-session, this should take care of most problems.

Can someone help me?

Adding aliases, although a bit tiresome, seems to be the most promising way. Unfortunately, the outstanding problems are:

  1. File system operations: I don't want to always have sudo in front because if the file doesn't already exist, then it is created as being owned by root, which introduces big headaches. The only way I can think of (but it would be too dangerous) is to write a wrapper around filesystem commands to add sudo if it turns out that I'm modifying a root-owned file).
  2. GUI apps: same as above.

A lot of people have voiced their disapproval at my request and down-voted my question, presumably because they think it's a horrible idea to decrease the "security" of the system. I would respectfully disagree, since I think that is a very narrow-minded view. Security measures don't exist in a vacuum - it must also be usable for it to be effective. If it becomes onerous and annoying, then people will do whatever they can to circumvent it.

I'm going the more tech-heavy route to get around it, but you see it when regular users choose short passwords, or write down their passwords when they are forced to choose ridiculously complex passwords. The consensus in the comments is that it's the user's fault or that the user should live with horribly-designed security measures, whereas I really feel that it is the designer's/programmer's fault. There should be a higher bar. What angers me the most is that the system could help you but doesn't. The OS/program obviously knows when I don't have permission to do something - why doesn't it just ASK ME to elevate my privilege level? Why does it make me REDO EVERYTHING, except this time use sudo?

To the people who say it prevents you from accidentally screwing up your sy

  • 6
    you can do what you want. you really really shouldn't. get used to working with sudo, and you'll start getting to know when to use it ahead of time... plus, you'll know when to use it on any other sudo-enabled system . – quack quixote Nov 11 '09 at 2:38
  • 2
    why not add yourself to the mysql group? should take care of #3. – DaveParillo Nov 11 '09 at 2:42
  • 2
    That's stupid (the philosophy, not your answer) - the OS should adapt to me not the other way around. – red.october Nov 11 '09 at 2:43
  • 4
    this reminds me of a HHGTTG quote: "This will all end in tears, I just know it." --marvin – quack quixote Nov 11 '09 at 2:49
  • 2
    @Nathaniel: I understand that, but in this case I'm willing to sacrifice the security aspect. @~quack: I don't really want to this to become a flame war - I'm just looking for help here. I've already stated what I need and that I'm aware of the consequences. I respect that you would do things differently. I'm only asking for the same respect in return. – red.october Nov 11 '09 at 3:01

If you really want to 'be like Win XP', why not unlock the root account & do everything as root? Sudo is there to prevent you from trashing your system inadvertently. It is especially easy to screw up your X config as root. Backup often.

Less drastic (but still not too security concious) options:

  1. Add yourself to the root, wheel & staff groups. You might want other service-related groups (mysql, www-data, etc). (wheel is an administrative group akin to Windows' Administrators group.)
  2. Remove the password for sudo
  3. Set the sudoers password timeout to a large number
  • Yes, I've considered #2 and #3 (I'll edit the question to include things I thought about). What does #1 do - what new things can I do as part of the root group and the wheel group (what group is this - it sounds weird) that I couldn't do before? – red.october Nov 11 '09 at 2:45
  • 1
    Adding yourself to wheel linuxpoison.blogspot.com/2008/12/… will allow you to perform any tasks in the wheel group without having to sudo. This book books.google.com/… has a good explanation of wheel (and other things you may find annoying). – DaveParillo Nov 11 '09 at 4:37
  • 1
    Ubuntu may be a bit different. There is no wheel group, although the default user is made a part of the admin group, which has the same entry as the root user in the sudoers file. I don't think adding myself to any group will allow to do things without prefixing the command with sudo. – red.october Nov 12 '09 at 5:30
  • If a file allows edit or execute permission for a group & you are a member of the group, then you can edit or execute it, no sudo required. – DaveParillo Nov 12 '09 at 15:52

You can give root a password (with sudo passwd root), and then just log in as normal as root.

You can also start bash as root with sudo -s, the -s is for shell.

You really shouldn't. If you're a normal desktop user, then you shouldn't hit into those file permission problems.


What you want to do is a really bad idea.

However, you seem determined.

Edit /etc/passwd. Change your user's UID to 0. Log out, log in. You're now equal to root.

To clean up, run this:

find / -uid <old uid> -exec chown root:root {} \;

Again, this is a really bad idea and I don't recommend it.


You can install nautilus-gksu to add an "open as root" option in the right-click menu in the file browser. Combine that with removing the password for sudo and it's downright convenient to open something as root from the GUI. If you want to.

Also you can add a root terminal to your Applications menu. Right-click the applications menu and click Edit menus. Then go into System Tools and check off Root terminal. It's like sudo bash without any typing.

  • 1
    Thanks, but I just want to be able to do something, no questions or extra steps required. – red.october Nov 11 '09 at 3:02
  • 1
    The root terminal has no extra steps, just a different icon to click. "Open as root" involves a right-click then a left-click instead of a double-click. Hell, once you've eliminated the password for sudo you can create a shortcut for gksudo nautilus and you can run the entire file browser as root. But the first bit of advice that leaps to mind is adapt or perish. – regan Nov 11 '09 at 3:45
  • Running the entire file browser as root sounds like a good idea. And remember, "adapt or perish" does not explicitly state a subject. It applies to OS's as much as it does users. – red.october Nov 11 '09 at 4:36
  • 1
    The OS didn't post a question on Super User. – regan Nov 11 '09 at 4:51
  • I was insinuating that you wouldn't, even if the OS did post. But, perhaps I misunderstood your tone. In any case, your advice was well-intentioned. Thanks. – red.october Nov 11 '09 at 5:42

Work as root, problem solved. If you really value your convenience that highly above security...

It happens to me too that I want to edit a protected file and forget sudo. But my editors let me know before I can change anything, because they just don't let me (since the file is read-only. If I can even open it.) But then I exit, type ctrl-a, "sudo ", ENTER, and that's it (yes, I've upped the timeout quite a bit).

But... I really don't have to do anything root-y that often. Oh, and I don't use GNOME/KDE, so annoying popups don't happen. ;-)

Closing, let me quote the Eagles: "Get over it". Just get used to it. It will benefit you in the long run. Otherwise, you may, no, you probably will, get used to sloppy security. And that may hurt others too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.