Ask Your Question
0

Unable to login with username other than the root

asked 2013-09-13 15:14:56 -0500

rizwaan gravatar image

updated 2013-09-13 22:34:12 -0500

Hi folks,

1) I did a mistake by clearing cache with this command ~/ .cache from tty2 and then issuing a command restart lightdm

2) I was supposed to do this procedure rm -R ./cache then sudo dpkg -reconfigure ligtdm restart. ( i searched it in google for troubleshoot the login screen not showing to choose xfce-session desktop )

3) Now when i log in from tty2 with my username i receive the following messages:

`-rizwan /home/rizwan` : change directory failed : no such file or directory
logging in with home = `''/''.`
-bash-4.2$ -

4) However now im only able to login in from root in both tty2 and window display

5) While booting i can see my old kernel was added in the grub which was not present after updating to the new kernel ran in normal condition.

your soon reply will be appreciable and thanks in advance.

As FranciscoD requested i gave this command ls /home/ from the root and no output info, it just get back to root prompt again

PLEASE NOTE: I'm completely in the root now

edit retag flag offensive close merge delete

Comments

2

Are you saying that you ran the command rm -R ~/ .cache So you deleted your home directory and all its contents?

sudormmiusrf gravatar imagesudormmiusrf ( 2013-09-13 16:13:47 -0500 )edit

i do not know ~/ .cache is home directory and all its contents, but i gave the command rm -R ~/ .cache and it has accepted it.

rizwaan gravatar imagerizwaan ( 2013-09-13 20:11:34 -0500 )edit
1

You seem to have deleted your home directory: ~/ as @sudormmiusrf suggests. The login manager cannot find a location to write files to. Please post the output of ls /home/ and update your question with the output.

FranciscoD_ gravatar imageFranciscoD_ ( 2013-09-13 21:19:14 -0500 )edit

I did what you say and edited my question too

rizwaan gravatar imagerizwaan ( 2013-09-13 22:20:38 -0500 )edit
1

@sudormmiusrf is most likely right. You may want to create a new home directory using mkdir /home/rizawaan , copy some files from /etc/skel using cp /etc/skel/.* /home/rizwaan followed by chown -R rizwaan:rizwaan /home/rizwaan and login again.

Amit Caleechurn gravatar imageAmit Caleechurn ( 2013-09-14 13:28:42 -0500 )edit

3 Answers

Sort by » oldest newest most voted
1

answered 2013-09-14 09:11:57 -0500

Gareth Jones gravatar image

updated 2013-09-14 09:13:24 -0500

You have indeed deleted your home directory. You meant to delete ~/.cache (i.e. the hidden “.cache” directory inside your home directory), but unfortunately the stray space makes all the difference. With a space, the command becomes “delete ~/ and .cache”, and “~” is short-hand for /home/your_user_name, your entire home directory.

You can restore enough to allow you to log in with:

cp -a /etc/skel ~your_user_name
chown -R your_user_name: ~your_user_name

/etc/skel contains the default home directory contents for new users, and the chown command makes sure that the new home directory and its contents belong to your normal log-in.

However, you will have lost all your (non-default) settings, and worse, any files that you kept in your home directory.

So the real question is: do you have a back-up?

edit flag offensive delete link more
0

answered 2013-09-14 15:14:30 -0500

rizwaan gravatar image

updated 2013-09-14 15:18:04 -0500

1) Thanks Much Gareth, for the clear output details, since im noob and i cannot understand your aforementioned commands, so i had followed the procedure as pablo from http://forums.fedoraforum.org/showthread.php?p=1668872#post1668872 as mentioned, but later on i see @sudormmiusrf where he edited your commands by nice output but it is too late for me.

2) I had followed those step as pablo mentioned. I lost my files and i must spent some time to recover it from my other storage and some of them from google search, however i had regain my Bookmarks intact, thanks to Google chrome that it automatically sync my bookmarks when i got signed into my google account.

3) I had learnt that How serious effect will occur when anything done on root.

4) it is just a beginning not an end for learning process, i truly appreciate your guidance to resolve my problem when i was in actual need and Thank you very much all for your kind help.

edit flag offensive delete link more

Comments

I also have the same problem but the commands above wont work, what do I do? please help...

marastern gravatar imagemarastern ( 2016-05-24 16:23:04 -0500 )edit
0

answered 2016-05-24 16:09:05 -0500

hi I also have the same problem but when I type in the above commands it output: "cp: cannot create directory '/home/my_user_name': permission denied" in this case what do I do?

edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-09-13 15:14:56 -0500

Seen: 457 times

Last updated: Sep 14 '13