0

I have a laptop (Lenovo E50) with, dual boot configuration of Windows 10 and Ubuntu 16.04. I was in ubuntu trying to install pulsars software called "Presto", following the installation structure I ran the command "sudo reboot". After the system shutdown and restarted the login screen, and when I type my usual password I couldn’t log in to my user account (it also refuses when I log as a guest). It keeps showing the error in the picture every time I type my password The error message. One last point is that when I access the recovery mode I see many lines but I assume that because I have a dual system.

I tried "sudo fsck -f /dev/sda9" from This solution, but still can’t access.

My questions:

Would you please help with how to access my system as a normal username?

Can I make some backup if I couldn’t log in, and how? I check my files (when I logged from the root in the recovery mode) and all the files are there. I really don’t want to lose my contains of this laptop (all my master & PhD work is there).

I would very much appreciate your help! :)

2 Answers2

0

It keeps showing the error in the picture e

That is not an error.

and restarted the login screen, and when I type my usual password I couldn’t log in to my user account

1 of the things that can lock you out of your session is permissions of 2 files in your /home/. Use control-alt-f1 (control-alt-f7 to go back) to log into a terminal session and do

$ ls -ltr .Xauthority .xsession-errors
-rw------- 1 rinzwind rinzwind   54 feb  2 16:55 .Xauthority
-rw------- 1 rinzwind rinzwind 3514 feb  2 16:55 .xsession-errors

These 2 lines need to be the same with your name as owner and group. If not that will be your problem. Do a ...

chown $USER:$USER .Xauthority
chown $USER:$USER .xsession-errors
chmod 600 .Xauthority
chmod 600 .xsession-errors

The 1st 2 set your owner and group, the 2nd sets the permissions to read, write for the 2 files.

Can I make some backup if I couldn’t log in, and how?

You already should have up to date backups... And yes you can do this from using terminal session (control-alt-f1) and copying your files. Same works from a live session, and you can do it from a desktop from there.

Rinzwind
  • 299,756
  • Hi @Rinzwind, thanks for the reply, how can get into a terminal session? do you mean login from recovery mode as a root or something else? – abubakr yagob Feb 08 '21 at 19:58
  • Boot the system and let it run as far as it goes. Then do a control-alt-f1, if that shows a login then you can use your user and password to log in to command line. – Rinzwind Feb 08 '21 at 20:04
  • I did what you said exactly, but still, I can’t logging, but the previous massage (of the recovering) has disappeared now. – abubakr yagob Feb 08 '21 at 20:49
0

Ok, I have finally been able to fix the issue and I thought it will be nice to share the answer in case it's helpful for some of you.

This is what I did after I accessed the consula terminal by ctr+alt+F1 (or ctr+alt+F1+shift):

1- I checked the permission of .Xauthority .xsession-errors and made them accessible by me as a user as shown in the answer of @Rinzwind

2- sudo apt-get update

3- sudo apt-get upgrade

4- the main problem was here, I checked my home Directory and was been owned by the root by "id username" then I ran: chown -R abubakar.abubakar abubakar

5- exit, exit

All is well now!