So I've been reading into the differences between using su
and sudo
, and everyone seems to be in agreement that the sudo
approach is safer than allowing access to the root account itself. They say that with the root account you could break your entire system with just a single command. This I understand. BUT the initial user created on the system also has access to all commands using sudo. This I can find out by running su -l
. If this is the case, then I can simply run sudo <game-ending command>
to ruin my system. So how is this approach better or safer then allowing me direct access to the super user account? I can run all of the same commands...
Is it because using sudo
on the command line I am explicitly telling the computer I think I know what I am doing? Do they think people will forget they are under the super user account unless they explicitly say so?
People also state that if the system were compromised and entered by someone foreign, being under the root account would allow them to do terrible things to my system. But it seems to me if they already have access to my account, and know my password, they can do these same terrible things by using sudo and entering my password since they don't even need to know the super user's password. What am I not getting here?