1

I tried to unmount all of my fstab mounts by using:

sudo umount --all

Right after that i tried to remount everything by using:

sudo mount -a

But got this error:

sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the ‘nosuid’ options set or an NFS file system without root privileges?

Now sudo doesn’t work at all even for simple commands. How could I fix this?

1
  • Boot from USB and fix it? Commented Jan 6, 2022 at 23:08

1 Answer 1

2

The error message indicates that the mount containing /usr/bin/sudo (i.e. /usr/bin/ or /usr/ or even just /) is mounted with the nosuid option. But without the effective suid bit sudo is unable to change the effective user.

So what probably happened is that umount --all unmounted /usr/bin or /usr/. Now running sudo will execute the binary file /usr/bin/sudo which is placed on the filesystem/mount that was previously covered/overlayed by the now unmounted filesystem at /usr/bin*.

If all you did was sudo umount --all a simple reboot should fix the problem since all configured mounts should be mounted automatically again.

If you can not/do not want to reboot you'll need some other way to execute mount -a as root:

  • try logging in as root directly
  • try using su instead

*the filesystem previously mounted at /usr/bin/ may also be the same device but remounted with different options

You must log in to answer this question.

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