0

Before anything I know that there is a similar question HERE.

When I execute:

sudo bash 

I get the following error:

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

However, there is a difference in my problem that does not permit me to solve it using that solution proposed as follows:

1. Log out as the current user, then log back in as root.
2. Execute chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo
3. Log out as root, then log back in as the current user. 

Because I cannot log in as root.

My question is how can I log in as root to do first step ?
i.e. 1. Log out as the current user, then log back in as root.

2 Answers2

1

You could boot from a USB thumb drive, mount your root file system and then chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo. After a reboot, sudo should be working again.

nagelp
  • 423
0
  1. Log out as the current user, then log back in as root.
  2. Execute apt-get remove sudo -y && apt-get install sudo -y
  3. Log out as root, then log back in as the current user.

This action will reset all permission to default state