Home page logo
/

basics logo Security Basics mailing list archives

Re: Root account desactivated
From: Dan Trainor <dant () cavecreek net>
Date: Thu, 11 Mar 2004 19:26:34 -0700

Martin -

Can you bring the machine down?  I would suggest passing init=/bin/sh to
the system at LILO boot (granted you are using LILO - I don't use GRUB,
but if you do, I'm sure there's a similar switch), mount partitions
accordingly, and use your editor of choice (be very careful, I think
that goes without saying), and edit the line accordingly.

On some of my personal machines at home, I've been fortunate/dumb enough
to leave another console logged in as root, and I could fix a problem
like this by switching to one of those logged in consoles and did what I
had to do, that way.  Perhaps you have physical access to this machine
and can do the same thing?

Hope that helps
-dant




On Thu, 2004-03-11 at 15:50, sil wrote:
If you have sudo on the machine you can try doing something like

sudo sed 's/\/sbin/\/nologin/\/bin\/bash/g' /etc/passwd >> /tmp/passwd|\
mv /tmp/passwd /etc/passwd



-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"The most tyrannical of governments are those which make
crimes of  opinions, for everyone has an inalienable
right to his thoughts." -- Benedict Spinoza


//sil

http://www.kungfunix.net   http://www.politrix.org
http://www.infiltrated.net http://bush.shafted.us

On Thu, 11 Mar 2004, MARTIN M. Bnoni wrote:

Hi community!

I have a really stupid trouble: on a Redhat 9.0, the line matching the root
account in the file /etc/passwd has been changed from ".../bin/bash" to
".../sbin/nologin". We have the root password, but when performing a "su"
command, the system replies that the account is not currently available.

So the question is: how from an user's account and knowing the root's
password but having the root account disabled can we reactivate this root's
account?

Any suggestion would be appreciated, I do not want to reinstall the box :(

Thanks a lot in advance!

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus


---------------------------------------------------------------------------
Ethical Hacking at the InfoSec Institute. Mention this ad and get $545 off
any course! All of our class sizes are guaranteed to be 10 students or less
to facilitate one-on-one interaction with one of our expert instructors.
Attend a course taught by an expert instructor with years of in-the-field
pen testing experience in our state of the art hacking lab. Master the skills
of an Ethical Hacker to better assess the security of your organization.
Visit us at:
http://www.infosecinstitute.com/courses/ethical_hacking_training.html
----------------------------------------------------------------------------



---------------------------------------------------------------------------
Ethical Hacking at the InfoSec Institute. Mention this ad and get $545 off 
any course! All of our class sizes are guaranteed to be 10 students or less 
to facilitate one-on-one interaction with one of our expert instructors. 
Attend a course taught by an expert instructor with years of in-the-field 
pen testing experience in our state of the art hacking lab. Master the skills 
of an Ethical Hacker to better assess the security of your organization. 
Visit us at: 
http://www.infosecinstitute.com/courses/ethical_hacking_training.html
----------------------------------------------------------------------------



---------------------------------------------------------------------------
Ethical Hacking at the InfoSec Institute. Mention this ad and get $545 off 
any course! All of our class sizes are guaranteed to be 10 students or less 
to facilitate one-on-one interaction with one of our expert instructors. 
Attend a course taught by an expert instructor with years of in-the-field 
pen testing experience in our state of the art hacking lab. Master the skills 
of an Ethical Hacker to better assess the security of your organization. 
Visit us at: 
http://www.infosecinstitute.com/courses/ethical_hacking_training.html
----------------------------------------------------------------------------


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
AlienVault