Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot change root Password
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
Demonking
n00b
n00b


Joined: 12 Mar 2007
Posts: 41

PostPosted: Mon Jul 11, 2016 11:20 pm    Post subject: Cannot change root Password Reply with quote

Hello,

i have reinstalled my gentoo.
Before reinstall i have saved /var and /home and remount it
during reinstall.
The Problem was the world file in /var, emerge thought that a lot
of packages were installed, so i have a lot of problems during emerge.

i used
Quote:
regenworld
to recreate the world file.
After that i have used

Code:
emerge -e world


After it finished i have reboot the system, but now i'm not able to
login with the console login prompt as root or other user.

Have also tried to chroot through livecd and change root pw,
but nothing helps.
Also other user are not possible.

Greetz

Demonking
_________________
I finally understand why Java's security model is so torturous:
It's to protect everyone else against people who write code like this.

The Answer to Life, the Universe, and Everything = 42
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Tue Jul 12, 2016 11:36 am    Post subject: Reply with quote

blind guess because your unable to login is not really helping. if you are using a different keyboard scheme than "us" one, and your system is still set on it, you might not actually type in the right login info. ie: on azerty keyboard when system is set to qwerty, typing abc you are actually typing qbc.

if you need better help, try better explains the problem, is the login is possible (keyboard works), is keyboard set in right language, is login accept, is password accept, what is the error then?...
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Tue Jul 12, 2016 12:55 pm    Post subject: Reply with quote

Usually you can overwrite your root password with a livecd when you tamper the corresponding files. I am quite sure the gentoo handbook gives a way on how to do that, and I assume you did a fresh install correct?

I did overruling my passwords several times for different users and the procedure was always the same over the years.

As noted: keyboard layout matters
having your file system mounted as read / write and the permissions to change these files. When there are some special file system flags set than you will be unable to tamper those files, although you have rw permissions on /.

Quote:
Write protecting a file using chattr command

Let say you want to write protect the file called data.txt so that no other users can change it including root user, enter (you must login as the root user to use chattr command):
# chattr +i data.txt

To remove i attribute, enter:
# chattr -i data.txt

http://www.cyberciti.biz/faq/linux-write-protecting-a-file/

You may check if you have write protection enabled, or any other special flag

--

May I kindly ask which procedures are you following with installing your system please?
Back to top
View user's profile Send private message
Syl20
Guru
Guru


Joined: 04 Aug 2005
Posts: 564
Location: France

PostPosted: Tue Jul 12, 2016 1:10 pm    Post subject: Re: Cannot change root Password Reply with quote

Demonking wrote:
Before reinstall i have saved /var and /home

But you didn't save /etc ?

Quote:
so i have a lot of problems during emerge.

Which ones ?

Quote:
i used
Quote:
regenworld
to recreate the world file.

But you didn't save the old world file ?
Please post the contents of the new one, at least. And the output of emerge --info.

Quote:
but now i'm not able to login with the console login prompt as root or other user.

Perhaps some logs ?

Quote:
Have also tried to chroot through livecd and change root pw, but nothing helps.
Also other user are not possible.

Try to set a really (really) simple password, like 'o' (without the quotes), to avoid keymap problems.
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