Ubuntu – Make Regular User automatically Root on Ubuntu (i.e., make Ubuntu behave like Windows XP)

sudoUbuntu

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?

[Update]
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

Best Answer

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
Related Question