On 12/30/23 20:48, Robert McBroom via users wrote:
On 12/30/23 18:18, Mike Wright wrote:
> On 12/30/23 15:13, Robert McBroom via users wrote:
>> On a system restore from a tar archive sudo won't work. Says
>> /usr/bin/sudo needs to be owned by 0 with the suid bit set. Root
>> owns the file and is 0. Looking at a working system directory list shows
>>
>> -rwsr-xr-x. 1 root root 57456 Aug 16 20:00 su
>> ---s--x--x. 1 root root 202872 Jul 24 20:00 sudo
>>
>> How does that s bit get set?
>
> man chmod, paragraph 2
>
The error message is about an suid bit while the man page talks about
setuid, trying it works. Not a clear extension over the old 777.
chown 0:0 /usr/bin/sudo root root
chmod 755 /usr/bin/sudo rwxr-xr-x
chmod u+s /usr/bin/sudo rwsr-xr-x