0

My machine has 2 NVMe drives.

During install, I loaded everything onto one of them and left the 2nd one untouched. I figured this would be a good way to learn about mounting drives after install. So I mounted it to /mnt/Second.

I tried moving files to it and learned what most of you probably already know: mounting a drive doesn't give the current user permissions for it. So, with /mnt as my current directory, I did:

sudo chown -R myusername Second 

cool, I was able to move files to it.

But now when I try to use sudo, I get:

sudo: /etc/sudo.conf is owned by uid 1000, should be 0 sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set 

Questions:

Why did changing the owner of /mnt/Second change the ownership of /etc/sudo.conf and /usr/bin/sudo?

Is my system completely borked now or can this be fixed ?

1
  • 2
    If that was the actual chown command that you used, then it should not have affected the ownerships of the sudo-related files. If you look at these files with ls -l, what are their ownerships? What about other files under /etc and /usr/bin and other directories? Commented May 6, 2022 at 11:16

1 Answer 1

0

No idea how that command changed the permissions of a file in a different path.

To fix, start up your host from a bootable USB drive, mount the drive change change the onership back to root.

If /etc/sudo.conf got changed there will probably be other file access broken by this. If you don't have backups (shame on you) then it may be simpler to backup /home (along with any other data directories) now and reinstall.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.