Pros of using a root
account:
root
password can in many cases be a lot safer. It can be longer and more complex than your normal password since you'll need to use it less often.root
privileges (via sudo
).Cons of using a root
account:
root
account, a hacker knows exactly what to target. On a multi-user system, if only one user account has administrative privileges, they might have a harder time figuring things out.It is worth noting, that hacking rarely happens through password cracking, or brute force attacks. A much more common way to get privileges is e.g. social engineering, where users are tricked into giving up their passwords, or plain and simple surveillance, key-logging, etc. Despite what Hollywood would have us believe, the most effective tool a hacker can use is psychology.
Pros of using sudo
:
root
account -- As discussed above, this can be a lot safer.john
can be given admin privileges, and nobody would be the wiser just by looking at it.sudo
would allow to give certain users only some admin privileges, not necessarily full root
powers. This might be beneficial on a multi-user system, with varying levels of roles, and is possibly less important on a home computer.Cons of using sudo
:
root
account -- sudo
does not always suffice, some very low-level operations need a proper root
account. Again, this might no concern home users.root
privileges can be as dangerous anything. If super-user powers are just a password away, nothing will stop a user to accidentally wreck the system.sudo
will continue to execute with elevated privileges even when the user is logged in normally, and any commands the script calls, will be running as root
. This might be intended behaviour but can easily become a security issue too.