[sudo-users] accidentally changed the owner of sudo

Matthew.Stier at us.fujitsu.com Matthew.Stier at us.fujitsu.com
Fri Sep 1 08:51:20 MDT 2017


That assumes that su's permissions have not been altered; and give the command line executed ....

Looks like you will need to boot from unaltered media (CD/DVD/USB) or remove the drive and mount it on another system, and use that system to reset the file ownership.



-----Original Message-----
From: sudo-users [mailto:sudo-users-bounces at sudo.ws] On Behalf Of Todd C. Miller
Sent: Friday, September 01, 2017 9:44 AM
To: Tingyu Lu <tlu3 at ncsu.edu>
Cc: sudo-users at sudo.ws
Subject: Re: [sudo-users] accidentally changed the owner of sudo

If you are using a system that does not let you log in as root,
such as Ubuntu or macOS, you will need to boot into single user
mode to repair the permissions and file mode.  On most other
systems you should be able to use "su" to change to the root
account.

To repair the ownership and mode run:

    chown root /usr/bin/sudo
    chmod u+s /usr/bin/sudo

 - todd
____________________________________________________________
sudo-users mailing list <sudo-users at sudo.ws>
For list information, options, or to unsubscribe, visit:
https://www.sudo.ws/mailman/listinfo/sudo-users


More information about the sudo-users mailing list