6
2
I'm getting annoyed by having to use sudo on my Ubuntu machine. The following are some of the reasons why:
- 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.
- 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.
- 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):
- Removing the sudo password: not bad, but I still have to remember to prefix commands with sudo
- Making the time-out really long: same as above
- 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
- 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:
- 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).
- 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
When (not if) your system is cracked and used by spammers or malware scum or becomes part of a botnet, please realize it's your own fault. – CarlF – 2010-02-02T15:08:44.863
In
bash
you can use!!
to repeat the last command enetered. So you could type insudo !!
at the prompt to append sudo to the last command entered without retyping or copy-pasting. – 에이바 – 2014-12-16T18:53:59.190Some people just aren't ready or willing to drop the Windows mind-set. – Wesley Rice – 2010-12-19T02:42:02.517
6you 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 – 2009-11-11T02:38:01.380
2why not add yourself to the mysql group? should take care of #3. – DaveParillo – 2009-11-11T02:42:04.527
2That's stupid (the philosophy, not your answer) - the OS should adapt to me not the other way around. – red.october – 2009-11-11T02:43:59.170
I'd say you should adapt the OS to you. That being said, it seems to me that part of the security of Linux is due to this method of not always running with full permissions. – Nathaniel – 2009-11-11T02:48:11.037
4this reminds me of a HHGTTG quote: "This will all end in tears, I just know it." --marvin – quack quixote – 2009-11-11T02:49:16.043
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 – 2009-11-11T03:01:00.237
Good question. Constantly being asked for passwords is annoying, and the root permissions system is primarily for servers that have multiple user accounts on them, so users can't access each others' accounts or screw up the system for everyone. On a home machine with only one user, it makes less sense. Destroying a user's home directory is much worse than destroying the system files. – endolith – 2009-12-21T17:05:13.157