Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved]access to root account
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Vibe
n00b
n00b


Joined: 01 Sep 2010
Posts: 61
Location: /Europe/Poland

PostPosted: Wed Feb 02, 2011 7:34 pm    Post subject: [Solved]access to root account Reply with quote

Hi, :)

I decided to write my post because I didn`t get solution on my forum.I have problem with access to root account and user account.If I write user name and password I get in console:
Code:

Unable to cd to "/home/User_name"


I use LILO bootloader.


Regards and in advance I thank you very much for help novice user Gentoo. :wink:
_________________
HP Compaq 6820s, x86 ,KDE , 2.6.34-tuxonice, Intel Pentium Dual CPU 1.73GHz


Last edited by Vibe on Fri Feb 04, 2011 7:57 pm; edited 1 time in total
Back to top
View user's profile Send private message
disi
Veteran
Veteran


Joined: 28 Nov 2003
Posts: 1354
Location: Out There ...

PostPosted: Wed Feb 02, 2011 7:39 pm    Post subject: Reply with quote

As you reach the login, then you are way past the bootloader.
If you didn't define the home folder for root, it logs you in with / as homefolder... per default. should :)

Did you put the quotes " actual into the /etc/passwd where the homefolderpath is defined?
Did you check the permissions on the users homefolder?
_________________
Gentoo on Uptime Project - Larry is a cow
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21706

PostPosted: Thu Feb 03, 2011 12:19 am    Post subject: Reply with quote

Please post the output of nl /etc/passwd ; ls -ld / /home /home/User_name.
Back to top
View user's profile Send private message
Vibe
n00b
n00b


Joined: 01 Sep 2010
Posts: 61
Location: /Europe/Poland

PostPosted: Thu Feb 03, 2011 5:47 pm    Post subject: Reply with quote

Hi, :)

Thank you very much for answers.I have to explain from the beginning what is the heart of the matter.I installed Gentoo with Gnome environment but when I login per GDM (write username and password) I received announcement:

I tried to translate from polish into english: :?

Code:

File $HOME/.dmrc was ignored.This is the reason that system could`t write default session and language.The file should belong to user and to have rights 644.Directory $HOME user has to belong to him and could`t be written by another users.


I get help on my forum and I write in console:

Code:

cd /home
chmod 700 /home/my_user_name
chmod 644 /home/my_user_name/.dmrc
chown /home/my_user_name/.dmrc


The file /home/my_user_name/.dmrc did`t exist so I write in console

Code:

touch /home/my_user_name/.dmrc


and repeat command:

Code:

chmod 644 /home/my_user_name/.dmrc


This action didn`t effect:

I repeat this command assuming that my home directory is /home (but with this same effect).

so I write in console:

Code:

env


and I known that $Home=/root

I wrote the same above commands assuming that home directory is (/)

...and now I couldn`t to login to any user and root acounts.

When I write login and password in console I received:

Code:


Unable to cd to "/home/my_user_name"

This is my_user_name.unknow_domain (Linux i686 2.6.34-tuxonice-r6-libre)

my_user_name login:

username
password


...and over and over again...


....


What you think about my problem.Is way to solve it or I should think rather about reinstallation?
_________________
HP Compaq 6820s, x86 ,KDE , 2.6.34-tuxonice, Intel Pentium Dual CPU 1.73GHz


Last edited by Vibe on Thu Feb 03, 2011 5:59 pm; edited 3 times in total
Back to top
View user's profile Send private message
phajdan.jr
Retired Dev
Retired Dev


Joined: 23 Mar 2006
Posts: 1777
Location: Poland

PostPosted: Thu Feb 03, 2011 5:51 pm    Post subject: Reply with quote

No need for reinstallation. Boot from a LiveCD, chroot, and restore proper permissions:

Code:

drwxr-xr-x 19 root root 4096 Jan  3 08:07 /             # 755
drwxr-xr-x 4 root root 4096 Oct 26 16:20 /home          # 755
drwx--x--x 132 user users 12288 Feb  2 19:12 /home/user # 711

_________________
http://phajdan-jr.blogspot.com/
Back to top
View user's profile Send private message
Vibe
n00b
n00b


Joined: 01 Sep 2010
Posts: 61
Location: /Europe/Poland

PostPosted: Thu Feb 03, 2011 6:29 pm    Post subject: Reply with quote

hmm...Thank you for fast answer.I am in chroot but I don`t know what commands to write in console:

Code:

chmod 755 / ?
chown 755 /  ?


I am beginner user of Gentoo.


regards and I thank you very much for help! :)
_________________
HP Compaq 6820s, x86 ,KDE , 2.6.34-tuxonice, Intel Pentium Dual CPU 1.73GHz
Back to top
View user's profile Send private message
phajdan.jr
Retired Dev
Retired Dev


Joined: 23 Mar 2006
Posts: 1777
Location: Poland

PostPosted: Thu Feb 03, 2011 6:35 pm    Post subject: Reply with quote

Yes, here's the right sequence of commands:

Code:

chmod 755 /
chmod 755 /home
chmod 711 /home/user


Of course use your own username instead of "user". By the way, you can learn more about the commands by running "man chmod" and "man chown". There is another good guide here: http://www.funtoo.org/en/articles/linux/lpi/3/
_________________
http://phajdan-jr.blogspot.com/
Back to top
View user's profile Send private message
Vibe
n00b
n00b


Joined: 01 Sep 2010
Posts: 61
Location: /Europe/Poland

PostPosted: Thu Feb 03, 2011 7:18 pm    Post subject: Reply with quote

thank you for help very much! :)
_________________
HP Compaq 6820s, x86 ,KDE , 2.6.34-tuxonice, Intel Pentium Dual CPU 1.73GHz
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum