How can I sudo a user named sudo in Linux?

frowny March 7, 2011
Pinterest Stumbleupon Whatsapp

Just to see what would happen, I made a user named sudo on my Arch Linux machine. Attempting to sudo this user Sudo, I type ‘sudo sudo’. this brings up the usage of the sudo command. I try ‘sudo sudo sudo’, which after making me enter my sudo password shows the usage. I type ‘sudo sudo sudo -i’ which shows me the usage and than leaves me as root. Is there any way at all to sudo sudo?

Ads by Google

  1. Mike
    March 7, 2011 at 9:46 pm

    By default sudo will use the root user for the command.

    If you want to run a command as a specific user the proper usage is
    sudo -u

    In your case that would be sudo -u Sudo. But I'm not sure if sudo is case-sensitive in terms of the username. I only use it to run commands as root