Ok, I must admit to a really bozo blunder when trying to adjust ownership of two folders on a new Manjaro Linux install on a work computer today. I was in Konsole and I thought I was inside folder “/d” and I typed:
chown -R aragorn:aragorn *
in order to change ownership of all files and folders inside /d to “aragorn:aragorn”.
However, I was actually in “/”, not “/d”, so that changed ownership of nearly everything! It also generated thousands of error messages, but I could only see the last 1000 because my console scrollback was set to 1000.
I tried to fix that by doing:
chown -R root:root *
then going into folders “/d”, “/e”, and “/home” and changing ownerships there manually.
However, that was not entirely successful, as some things are now broken:
- “su” rejects root’s password (but I can do ctrl-alt-2 and login successfully as root)
- “sudo” is broken and says “/usr/bin/sudo must be owned by uid 0 and have setuid bit set”
- pamac is broken and crashes with “authentication failure”.
This is a recent (1-week-old) Manjaro installtion and has no un-backed-up data files, so simply reformatting the SSD and reinstalling Manjaro is an option.
So, what do you think? Can this be fixed? Or should I just nuke it and re-install Manjaro?