0

Can I grant a User all the Root permissions by logging into root account and then log in to that user account and delete the Root user itself by logging into the User to which rights have been granted?

  • 1
    Root user is disabled by default in Ubuntu. The user created on installation of Xubuntu (from your tag) is granted sudo rights so there is no need for a root login thus is disabled by default on install. You can make sudo work without password, but it's unwise. – guiverc Sep 10 at 8:10
  • Could you explain why you want to delete the root user? Linux is made to work with it. If you’re worried about having one more user than you actually use, then look into the /etc/passwd file – there is a lot of them in fact! – Melebius Sep 10 at 8:16
  • This seems like an early-semester homework question in a class that does not use Ubuntu. – user535733 Sep 10 at 13:28
3

This would be effectively renaming root to another username. This can be done technically, though not the way you described. But it would be a very bad idea, because a lot of things assume the privileged user is called root, and they would break if it isn't. So working with sudo, as it's the default in Ubuntu, is probably the best way. That also allows you to use the extended privileges only when necessary, which makes it less likely to break things with a simple typo.

  • What things assume that root is named root? I guess some shell scripts might, but most tools will check that the UID is 0, not the name of the user as far as I know. – terdon Sep 10 at 8:36
  • 1
    @terdon Many daemons use root as the user name to set up cronjobs, send report mails to, check the permissions of their config directory and the like. As a commenter next door wrote, "You're right no application should assume [that the username to uid 0 is root]. But I'd really like to recieve 1$ for every application or script that does!" – Henning Kockerbeck Sep 10 at 9:30
  • Heh, fair enough :) – terdon Sep 10 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.