{
    "mode": "man",
    "parameter": "sudo_root",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/sudo_root/8/json",
    "generated": "2026-10-04T09:41:32Z",
    "synopsis": "sudo command",
    "sections": {
        "NAME": {
            "content": "sudoroot - How to run administrative commands\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "sudo command\n",
            "subsections": [
                {
                    "name": "sudo -i",
                    "content": ""
                }
            ]
        },
        "INTRODUCTION": {
            "content": "By default, the password for the user \"root\" (the system administrator) is locked. This means\nyou cannot login as root or use su. Instead, the installer will set up sudo to allow the user\nthat is created during install to run all administrative commands.\n\nThis  means  that in the terminal you can use sudo for commands that require root privileges.\nAll programs in the menu will use a graphical sudo to prompt for a password. When  sudo  asks\nfor a password, it needs your password, this means that a root password is not needed.\n\nTo  run  a command which requires root privileges in a terminal, simply prepend sudo in front\nof it. To get an interactive root shell, use sudo -i.\n\n",
            "subsections": []
        },
        "ALLOWING OTHER USERS TO RUN SUDO": {
            "content": "By default, only the user who installed the system is permitted to run sudo. To add more  ad‐\nministrators,  i.  e. users who can run sudo, you have to add these users to the group 'sudo'\nby doing one of the following steps:\n\n\n* In a shell, do\n\nsudo adduser username sudo\n\n\n* Use the graphical \"Users & Groups\" program in the \"System settings\" menu  to  add  the  new\nuser to the sudo group.\n\n",
            "subsections": []
        },
        "BENEFITS OF USING SUDO": {
            "content": "The benefits of leaving root disabled by default include the following:\n\n\n* Users do not have to remember an extra password, which they are likely to forget.\n\n* The installer is able to ask fewer questions.\n\n* It avoids the \"I can do anything\" interactive login by default - you will be prompted for a\npassword  before  major  changes  can  happen, which should make you think about the conse‐\nquences of what you are doing.\n\n* Sudo adds a log entry of the command(s) run (in /var/log/auth.log).\n\n* Every attacker trying to brute-force their way into your box will know it  has  an  account\nnamed  root  and  will  try that first. What they do not know is what the usernames of your\nother users are.\n\n* Allows easy transfer for admin rights, in a short term or long term period, by  adding  and\nremoving users from the sudo group, while not compromising the root account.\n\n* sudo can be set up with a much more fine-grained security policy.\n\n* On  systems  with  more than one administrator using sudo avoids sharing a password amongst\nthem.\n\n",
            "subsections": []
        },
        "DOWNSIDES OF USING SUDO": {
            "content": "Although for desktops the benefits of using sudo are great, there are possible  issues  which\nneed to be noted:\n\n\n* Redirecting  the  output  of commands run with sudo can be confusing at first. For instance\nconsider\n\nsudo ls > /root/somefile\n\nwill not work since it is the shell that tries to write to that file. You can use\n\nls | sudo tee /root/somefile\n\nto get the behaviour you want.\n\n\n* In a lot of office environments the ONLY local user on a system is root.  All  other  users\nare  imported  using NSS techniques such as nss-ldap. To setup a workstation, or fix it, in\nthe case of a network failure where nss-ldap is broken, root is  required.  This  tends  to\nleave the system unusable. An extra local user, or an enabled root password is needed here.\n\n",
            "subsections": []
        },
        "GOING BACK TO A TRADITIONAL ROOT ACCOUNT": {
            "content": "",
            "subsections": [
                {
                    "name": "This is not recommended!",
                    "content": "To enable the root account (i.e. set a password) use:\n\nsudo passwd root\n\nAfterwards, edit the sudo configuration with sudo visudo and comment out the line\n\n%sudo  ALL=(ALL) ALL\n\nto disable sudo access to members of the sudo group.\n\n"
                }
            ]
        },
        "SEE ALSO": {
            "content": "sudo(8), https://wiki.ubuntu.com/RootSudo\n\n\nFebruary 8, 2006                              sudoroot(8)",
            "subsections": []
        }
    },
    "summary": "sudoroot - How to run administrative commands",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "sudo",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/sudo/8/json"
        }
    ]
}