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 )

grooveplex
  • 2,486
Kuldeep Dwivedi
  • 11
  • 1
  • 1
  • 6
  • 1
    Can you run "ls -l /usr/bin/sudo" and paste the result? – Little Jawa Jul 08 '16 at 08: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 08 '16 at 08:25
  • 7
    As @dadexix86 said - looks similar to this post (http://askubuntu.com/questions/452860/usr-bin-sudo-must-be-owned-by-uid-0-and-have-the-setuid-bit-set). If 'sudo' permissions are broken, you won't be able to fix them easily, because you need 'sudo' to do it... – Little Jawa Jul 08 '16 at 08:29

1 Answers1

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.

Byte Commander
  • 107,489
  • 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 – Kuldeep Dwivedi Jul 08 '16 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 08 '16 at 13:21