You are not logged in.
Pages: 1
I did some stupid things by accident regarding chown, and now I'm locked on CRTL + ALT + F2, no DE. However, I've got a peep of light. I have timeshift installed, hence a backup from some days ago. However, in order to execute timeshift --restore, I need to do it as sudo, currently impossible. Whenever I try to run it, I get:
sudo
/etc/sudo.conf is owned by uid 1000, should be 0
/usr/bin/sudo must be owned by uid 0 and have the setuid bit set
When trying su...
su
# password input
su: cannot set groups operation not permitted
I have some important files in my storage, so I don't want to re-install everything, any suggestion is appreciated, thanks in advance!
PS: I'm posting it from other pc.
————————————————
Solution:
Booted from an Ubuntu live CD, open terminal, go chroot:
sudo mkdir /mnt/name
cd /mnt/name #name does not matter, type anything
sudo mount /dev/yourdrive /mnt/name
sudo chroot /mnt/name /bin/bash
Warning: instead of ‘yourdrive’ put the correct path, which will vary depending on your specs.
Tip: If you are also on an Ubuntu live, go to the application Disk, and copy the path from there.
Once you’re in chroot, change the permissions using chown root:root path. Before trying to boot again, try to sudo and fix the remaining issues.
This should fix the issue.
Ps: sorry if there is a formation error here and there, I’m posting it from a phone.
Last edited by LucasBiazi (2020-12-09 18:41:11)
Always backup important files when editing it.
Offline
You can restore timeshift backups from another system running timeshift. It can be another installed system that can access the borked installation or by using live media, as long as timeshift is running on it.
You ought to read the timeshift documentation if you are going to rely on it, especially the part about system restore.
Offline
You can restore timeshift backups from another system running timeshift. It can be another installed system that can access the borked installation or by using live media, as long as timeshift is running on it.
You ought to read the timeshift documentation if you are going to rely on it, especially the part about system restore.
Did it, still the same error...
If I had to re-install arch, could I still save my files?
Last edited by LucasBiazi (2020-12-09 02:57:41)
Always backup important files when editing it.
Offline
Boot the install media, chroot, and fix the permissions / run timeshift.
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Boot the install media, chroot, and fix the permissions / run timeshift.
When I'm on the chroot, I tried:
sudo chown root:root /etc/sudo.conf
sudo: /etc/sudo.conf is owned by uid 1000, should be 0
sudo: /etc/sudo.conf is owned by uid 1000, should be 0
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: fatal error, unable to load plugins
Plus, for some reason, now I can only type in the GNOME finder... I'm currently typing there, CTRL + C and then CTRL + V...
Always backup important files when editing it.
Offline
Why are you using sudo in that case?
Offline
Why are you using sudo in that case?
Haven't even realized that, sorry, I'll keep trying the last suggested solution now that I could use chown...
Always backup important files when editing it.
Offline
I did as fukawi2 said, but I'm still getting the same error after trying to boot on arch.
Always backup important files when editing it.
Offline
Hmmm … I see the path is /etc/sudo.conf
If you do this in a chroot from the live media, well, then you use also the chroot's sudo, not the one from the live media. And that one is borked.
Should be something like su -c "
chown root:root /mnt/etc/sudo.conf
"
Offline
'sudo.conf' is just a file so back it up as sudo.conf.bak then touch a new one and cat the content to it & remove the bak file. Done;)
mv /etc/sudo.conf /etc/sudo.conf.bak
touch /etc/sudo.conf
cat /etc/sudo.conf.bak > /etc/sudo.conf
Offline
I, apparently, solved the sudo issue. However, when I try to boot, no DE shows up. Right before the loading, I see “Bluetooth service: failed”, and then no DE shows up. I tried to use timeshift in all my snapshots, none of them worked out. I guess this installation is thrashed to hell already. Maybe I should just install it all again?
Always backup important files when editing it.
Offline
I'm not a timeshift user and can't comment on that, but, if your sudo issue is solved, please mark this thread 'solved'.
It's also appreciated if you tell/explain which solution you used to solve the issue.
For all your further Q. open a new one, preferably one item per thread, thanks.
Offline
Sure, I’ll update the OP, and close the thread. Thank you all!
Always backup important files when editing it.
Offline
Because of the context: you don't backup onto a non-posix filesystem (like vfat), do yo?
Offline
Pages: 1