Type something to search...

/usr/bin/sudo must be owned by uid 0 and have the setuid bit set on Ubuntu 20.04

If you encounter the error message "/usr/bin/sudo must be owned by uid 0 and have the setuid bit set" on Ubuntu 20.04, follow these steps to resolve the issue.

  1. During the boot process, press the ‘ESC’ key to access the GRUB menu.

GRUB Screen

  1. Select the first option, “Ubuntu,” and press the ‘e’ key to edit the boot parameters.

Edit Boot Parameters

  1. Append the following string to the line starting with ‘linux’ to boot into rescue mode:
systemd.unit=rescue.target
  1. Once in rescue mode, execute the following command to restore the correct permissions and ownership for /usr/bin/sudo:
pkexec chmod a=rx,u+ws /usr/bin/sudo

This command sets the necessary permissions and ensures that sudo is owned by the root user with the setuid bit set.

By following these steps, you should be able to resolve the issue and restore proper functionality to the sudo command on your Ubuntu system.


Share :

Related Post