0

I accidentally gave all permissions of my system to another user who has neither a password nor a home directory.

I have complete physical access to the computer, and I'm currently logged in via SSH with key into the system as my user named "chronove"... the user chronove had access to sudo rights, however those are now gone as I ran the command:

$ sudo chown -R mc:mc /

To give you some more information:

$ sudo
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

and

$ ll /usr/bin/sudo
-rwxr-xr-x 1 mc mc 140944 Jan 14 00:41 /usr/bin/sudo*

I cannot access any other instance to the server via SSH or FTP to make any backups. My initial plan to solve this issue was to grab a backup of everything needed and reinstall the Ubuntu server. It seems I got read rights to all necessary files, however i'm unsure as to move several zip files across the only SSH connection I have (which would break on restart).

Elder Geek
  • 36,752

1 Answers1

0

I remembered having an apache server running on the system. As i have read rights as user chronove, yet i cant just type everything of the SSH console ( Putty ), so i can just copy all files i needed into the websites directory.

for example:

cp -R /home/chronove/MY_FILES/ /var/www/html/dl/

After copying all files i can copy them off the website from another computer ( found this program https://sites.google.com/site/visualwget/a-download-manager-gui-based-on-wget-for-windows which helps downloading a lot of folders ) on the network. After that reinstall Linux Ubuntu Server and there we go!