-1

I've read that you should disable root account and use an admin account instead. What are the differences between them ? Is an admin account safer ? If we can run a session as root using sudo -s then an admin can do anything root can, right ???

  • "Is an admin account safer ? " Yes but slightly: connecting from the outside knowing there is a root account requires someone to guess a password. Not knowing the admin name requires someone to guess that name and the password. – Rinzwind Jan 22 '20 at 18:07

1 Answers1

6

What you read was not for Ubuntu, but instead for another Linux distro.

Ubuntu and its 'flavours' have the 'root' account pre-disabled. Every administrator's task in Ubuntu is done by a user assuming the rights of root through sudo, or just as that user without root access.

Instead, as you noted, when you need to do something with administrator-level access, you use the sudo app. For example; want to know what partitions are on your drives? Do sudo parted -l to run the parted app as if you were root.

How can I add a new user as sudoer using the command line? is also a useful read.

As the esteemed waltinator observed, you can look through the sudo logs to see what commands you have entered as sudo, which can be extremely useful sometimes.

Is it safer than being able to login as root directly? Depends on your criteria for safety; house guidelines suggest sticking to objectively-answerable questions.

K7AAY
  • 17,202
  • 1
    IMHO it's safer to sudo command (NOT sudo bash). I've found my error by looking in the sudo logs more than once. – waltinator Jan 22 '20 at 19:58