Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

Can't login as root after etc-update

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
zaj_tam
n00b
n00b
Posts: 7
Joined: Fri Nov 28, 2003 7:43 am

Can't login as root after etc-update

  • Quote

Post by zaj_tam » Thu Nov 18, 2004 8:30 pm

So. I had 18 configs to look at and i was in a hurry. So i see this word merge all AND ... And i think to myself: merge does not equal overwrite. Then i merge all the configuration files. Among others the fstab and another one that seemed to contain my root password. Because i can not su to root anymore. Now i was wondering if there is any possible way to enter root without beeing physicaly present at the machine and set password in chrooted enviroment? I personaly think there is no way but i've also been the one to make a major screwup. Help?


thx :)
Top
pYrania
Retired Dev
Retired Dev
User avatar
Posts: 650
Joined: Sun Oct 27, 2002 8:19 pm
Location: Cologne - Germany
Contact:
Contact pYrania
Website

  • Quote

Post by pYrania » Thu Nov 18, 2004 9:49 pm

There is no other way than recover your root pwd within a chroot.
except you find a working exploit for one of your running services :)
Markus Nigbur
Top
zaj_tam
n00b
n00b
Posts: 7
Joined: Fri Nov 28, 2003 7:43 am

  • Quote

Post by zaj_tam » Fri Nov 19, 2004 6:11 am

Hm. I was thinking about that yes. But everything was updated very recently :/ I'l have to make a visit ....
Top
Lotu
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 106
Joined: Sun Sep 12, 2004 7:50 am
Location: Finland

  • Quote

Post by Lotu » Fri Nov 19, 2004 4:56 pm

It could be that you've overwrited your /etc/group file. You cannot su to root if your user is not in the wheel group. So check that file.

Bad line:

wheel:x:10:root

Good line:

wheel:x:10:root,john

where 10 is the group number (your number may be different, don't change it) and john is your username.

Of course you'll have to be root to edit the file, but check if you can logout and then login as root instead of su.

If you're connecting through ssh, try 'ssh root@address'.
In a world without walls and fences, who needs Windows and Gates?

I'm an evil homosexual communist.
Top
zaj_tam
n00b
n00b
Posts: 7
Joined: Fri Nov 28, 2003 7:43 am

  • Quote

Post by zaj_tam » Wed Nov 24, 2004 5:44 pm

thx. Yes, the group file was overwritten. But also the root password wasn't set :/ Anyways, the strange thing is that another user still had the groups set right. He was in the wheel group.
Top
flindt
Tux's lil' helper
Tux's lil' helper
Posts: 112
Joined: Wed Dec 10, 2003 12:26 pm
Location: Denmark

  • Quote

Post by flindt » Wed Nov 24, 2004 6:31 pm

Hi

I have the same problem, but I have not rebooted yet.. and a still have a root terminal running - but how do I find the exact problem? I also have a backup of /etc from right before the dispatch-conf ...

I cannot login as either user or root in new terminals.
Top
flindt
Tux's lil' helper
Tux's lil' helper
Posts: 112
Joined: Wed Dec 10, 2003 12:26 pm
Location: Denmark

  • Quote

Post by flindt » Wed Nov 24, 2004 6:40 pm

Tried to change my root passwd from the open terminal - but got

Code: Select all

thor etc # passwd
passwd: Cannot determine your user name.
thor etc #    
Which file holds user names?
Top
starcrusher
n00b
n00b
User avatar
Posts: 20
Joined: Wed Jul 28, 2004 4:36 pm
Location: Campinas / SP - Brazil

  • Quote

Post by starcrusher » Wed Nov 24, 2004 7:38 pm

Hello flindt,

The USER environment variable holds the user name of the current login session, /etc/passwd contains the user names, /etc/shadow contains the (encrypted) passwords.

/etc/passwd should at least contain the line

Code: Select all

root:x:0:0:root:/root:/bin/bash
I hope it helps. Good luck!
People can be divided in 10 groups:
Those that do and those that don't understand binary arithmetic.
Top
flindt
Tux's lil' helper
Tux's lil' helper
Posts: 112
Joined: Wed Dec 10, 2003 12:26 pm
Location: Denmark

  • Quote

Post by flindt » Wed Nov 24, 2004 8:11 pm

Thanks, but I have just restored my backup - now my config files are not up to date :( But at least I can login.

I checked the /etc/passwd and /etc/shadow against the backup files with diff before resoring them, and there was no difference. So I am gessing it could be an error in a script?! I also checked the /etc/pam.d and other stuff that had changed a little in the /etc folder, but I did not see any obvious errors...

I think this I rather serious, since it happened yesterday too - exact same problem, and I had to restore from a system backup. So today I payed extra attention to updating the config files using dispatch-conf, but since the same thing happened it was not just a simple update mistake on my part.
Top
Post Reply

9 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy