0
sudo fdisk -l

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

How to access permission to sda ( Primary HDD )

3
  • 1
    Can you run "ls -l /usr/bin/sudo" and paste the result? Jul 8, 2016 at 8:25
  • Probably you modified some of the original owners/permissions of system files. Reverting back the changes you have made will solve the problem. Most probably, you don't know what were the permissions before (why bothering checking them before modifying them, what could go wrong?) so your best option right now is to reinstall the system.
    – dadexix86
    Jul 8, 2016 at 8:25
  • 7
    As @dadexix86 said - looks similar to this post (askubuntu.com/questions/452860/…). If 'sudo' permissions are broken, you won't be able to fix them easily, because you need 'sudo' to do it... Jul 8, 2016 at 8:29

1 Answer 1

1

Your /usr/bin/sudo executable has either a wrong owner or permission set.

No matter which one applies here, the following two commands should fix it:

pkexec chown root: /usr/bin/sudo 
pkexec chmod 4755 /usr/bin/sudo

After that, sudo should be working normally again and you will be able to use it to run fdisk with root privileges with it.

2
  • 1
    outright1@outright1:~$ pkexec chown root: /usr/bin/sudo pkexec must be setuid root outright1@outright1:~$ pkexec chmod 4755 /usr/bin/sudo pkexec must be setuid root Jul 8, 2016 at 13:11
  • 1
    @KuldeepDwivedi In that case it looks like you severely screwed your file permissions. You should back up your data and reinstall- Alternatively you could boot from an Ubuntu live disk, mount your installed Ubuntu partition and fix the permissions from there.
    – Byte Commander
    Jul 8, 2016 at 13:21

Not the answer you're looking for? Browse other questions tagged .