# root password changed after upgrade[solved]

## 118947

hi!

I recently did a 

```

emerge --update --deep world

```

I then more or less accidentally let portage overwrite my configs in /etc 

I've managed to restore most of the configs, but one major problem remains.

My root password has been reset, and I cannot change it.

I also didn't install sudo, so no luck there...

I tried chrooting into my system (from a live cd) but that did't seem to let me (permanantly) change my root password.

Any suggestions ?

I do need my root account, especially as I am in the middle of setting up my new gentoo box  :Smile: Last edited by 118947 on Tue Nov 08, 2005 11:29 pm; edited 1 time in total

----------

## s0be

it sounds like your auth libraries/system (pam or whatever) is pooched.  Like your passwd file is encrypted without a salt and the auth system is using one.  Just a start on what the problem is(could be), I'm not sure of the solution.

----------

## DNAspark99

boot the cd

mount your drive

chroot into system

THEN change root passwd

...that *should* work  :Razz: 

----------

## 118947

 *Quote:*   

> boot the cd
> 
> mount your drive
> 
> chroot into system
> ...

 

Thats what I tried, with no effect.   :Crying or Very sad: 

 *Quote:*   

> Like your passwd file is encrypted without a salt and the auth system is using one

 

How can this happen during an upgrade, as I thought it had something to do with my config files in /etc, as these were overwritten?

----------

## Gutz

You sure your root password got changed?

Or are you trying to do "su -' to get root access?

Because your group file might have changed (happened to me once) and to use "su" the user you're executing the command with must be in the wheel group. If he's not there you'll get an error trying to "su".

Just a thought.

----------

## 118947

sadly my user is in the wheel group (in /etc/group)

I tried logging in directly as root, but that didn't work either  :Sad: 

----------

## 118947

ok, thank you all for your time, I managed to change the root password.

I figured that I can't "change" it to my normal password, as that wont register.

Changing it to something completely different does the trick (when chrooting into the system)

Now, I'm off to the pub  :Laughing: 

----------

