It makes sense to me. I don’t want to run everything as root. And I especially don’t want any program to have root access. Especially proprietary ones, but also free ones, because I don’t have the time nor the inclination to check every line of code.
If I’m not going to take advantage of POSIX user privileges, I may as well use windoze, and a filesystem like fat or ntfs.
AFAIK you need something LIKE it to function. That said, you can make it less work to use than it usually is. An alias that shortens it is feasible and easy - and an easy to type password can also be set if you are comfortable with the idea. Security is a state of mind anyway
However, too much can be be messed up in the system if the root user is the only user fulltime - it is not designed to handle it! (it is not Administrator mode on Windows!)
No it should never be run as root. It can be run as a normal user for 99% of the process. It only needs root for a small portion of it’s operation.
This is what happens if you try to run makepkg as root.
==> ERROR: Running makepkg as root is not allowed as it can cause permanent, catastrophic damage to your system.
I think you are misunderstanding the risk. Just because your user account can use sudo to run things as root, doesn’t mean you should. You should only run programs as root that absolutely require it. Whether the system is single-user or not is immaterial.
Consider another example, generating a new mirrorlist. You don’t want to generate the mirrorlist as root but you need to root to install it. This is where sudo or other tools have clear value. They allow you to perform actions partially as root.
Lastly, don’t forget that unless you remove polkit, you will also have pkexec which does the same thing.
Not really. I mean, if by “user” you mean a human being in front of the computer then yes, most computers are used by one person. However, you have multiple user accounts. Just look at your /etc/passwd file, it has maybe two dozen or so users. It’s not a single user computer in this sense (even though only one human being is using it). None of these users, except root, have root access, for security reasons. Tasks you can do without root access, you should do without root access, otherwise you’re just creating a vulnerability.
But when you, a human being using the computer, want to have root access, a program like sudo becomes very useful, because it allows a temporary privilege escalation, unlike switching to root to do these tasks.
Sudo is an alternative to su for running commands as root. Unlike su, which launches a root shell that allows all further commands root access, sudo instead grants temporary privilege elevation to a single command. By enabling root privileges only when needed, sudo usage reduces the likelihood that a typo or a bug in an invoked command will ruin the system.
Here is a practical example why I like sudo. Suppose I want to run a program as my normal user (I don’t want it to have root access, because I don’t trust it), but I want the standard output of that program to be redirected to a file owned by the root. How am I to accomplish that?
I could redirect the output to a temporary file owned by my normal user, then start a new shell session with su and login as root and then move the file overwriting the one owned by root.
Or, I could just run this as my normal user:
problematic_program | sudo tee /file_owned_by_root
Here, the only process that has elevated privileges is tee, which is a perfectly trustworthy utility.
It does the exact same thing as the example above with the temporary file, but it’s so much more convenient.