CodeWalrus

General => General Help & Troubleshooting => Topic started by: Dudeman313 on November 05, 2016, 07:47:03 PM

Title: Newbie Scrub Fails at Linux
Post by: Dudeman313 on November 05, 2016, 07:47:03 PM
I somehow managed to erase my home directory in elementaryOS. Now I can't login. I do have a backup for it, but I am unable to place it where it's needed because "Permission denied." Apparently, I don't have permission to do anything, even tho I have the only account(which is marked as Administrator) on the Linux half of my laptop. How do I restore the backup if I can't login?
Title: Re: Newbie Scrub Fails at Linux
Post by: Yuki on November 05, 2016, 08:03:39 PM
If you're a master of Linux command line, you can boot in Recovery Mode, login as root and restore your stuff.
Title: Re: Newbie Scrub Fails at Linux
Post by: kotu on November 05, 2016, 08:04:39 PM
/me realises that juju is evil
QUOTE
"If you're a master of Linux command line,"
Title: Re: Newbie Scrub Fails at Linux
Post by: Dudeman313 on November 05, 2016, 08:13:40 PM
Well, as the title says, I'm kind of not...
Title: Re: Newbie Scrub Fails at Linux
Post by: Yuki on November 05, 2016, 08:57:26 PM
Ummm, type "startx" after you logged in in recovery mode? If it works, that is.
Title: Re: Newbie Scrub Fails at Linux
Post by: Snektron on November 05, 2016, 09:21:46 PM
I assume you did try sudo? :P
Title: Re: Newbie Scrub Fails at Linux
Post by: Dudeman313 on November 05, 2016, 09:56:03 PM
I didn't know the command to use.
But I'll try Juju's suggestion.

EDIT: I can access the recovery mode, but I have no idea what to do when I get there.
Title: Re: Newbie Scrub Fails at Linux
Post by: gameblabla on November 05, 2016, 10:41:37 PM
How you managed to delete your home folder ?
Unless you were root or Elementary OS is really bad, i don't know.
In any case, if you have access to a terminal (try Ctrl+Alt+F6 during the login screen) or the recovery mode with a shell mode,
you could try to create a new user :
adduser yourusernamehere
Then log in with your new username and delete your old broken username.

Alternatively, you could just remove your linux partition with the usb installer
and reinstall Elementary OS.
Title: Re: Newbie Scrub Fails at Linux
Post by: Dudeman313 on November 05, 2016, 10:58:11 PM
Quote from: gameblabla on November 05, 2016, 10:41:37 PM
How you managed to delete your home folder ?
Unless you were root or Elementary OS is really bad, i don't know.
In any case, if you have access to a terminal (try Ctrl+Alt+F6 during the login screen) or the recovery mode with a shell mode,
you could try to create a new user :
adduser yourusernamehere
Then log in with your new username and delete your old broken username.

Alternatively, you could just remove your linux partition with the usb installer
and reinstall Elementary OS.
I was doing something in the terminal, and in all my n00bliness, it somehow got deleted. When I saw this, I attempted to create a new folder, but it said permission denied.

Also, I've been using ElementaryOS long enough to place some files I don't want to lose, so...

I am able to get to the root shell, but "startx" failed because of an authorization error. I'll try that.
I just wish I could open the file explorer with root permission, or have full control like I do with Windows 10. It makes no sense that I'm unauthorized to do certain tasks if there's no one else who is.

Title: Re: Newbie Scrub Fails at Linux
Post by: Unicorn on November 06, 2016, 02:53:12 AM
QuoteI just wish I could open the file explorer with root permission, or have full control like I do with Windows 10. It makes no sense that I'm unauthorized to do certain tasks if there's no one else who is.
Depending on your OS's file browser, you should be able to right click and select "open as root" (or something along those lines), type in your password and be all set. And yeah, if you have problems in Terminal with permissions, just put "sudo" in front of it.

If you can't get back in, just boot from a usb OS and open up your HDD in the file explorer and find your files. Though if you deleted your home directory they probably aren't there....
Title: Re: Newbie Scrub Fails at Linux
Post by: Dudeman313 on November 06, 2016, 04:03:58 AM
I did the usb thing and it worked. Thanks. I already had a backup of the home folder made somehow the same time it was deleted.


EDIT: Nope, I lied. It totally failed. Guess i'll just have to reinstall everything.