FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 02-02-2011, 01:44 PM
James Bensley
 
Default Lost root access

So on a virtual server the root password was no longer working (as in
I couldn't ssh in anymore). Only I and one other know it and neither
of us have changed it. No other account had the correct privileges to
correct this so I'm wondering, if I had mounted that vdi as a
secondary device on another VM, browsed the file system and delete
/etc/shadow would this have wiped all users passwords meaning I could
regain access again?

(This is past tense because its sorted now but I'm curious if this
would have worked? And if not, what could I have done?).

--
Regards,
James.

http://www.jamesbensley.co.cc/

There are 10 kinds of people in the world; Those who understand
Vigesimal, and J others...?
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-02-2011, 01:47 PM
Giles Coochey
 
Default Lost root access

On 02/02/2011 15:44, James Bensley wrote:

So on a virtual server the root password was no longer working (as in
I couldn't ssh in anymore). Only I and one other know it and neither
of us have changed it. No other account had the correct privileges to
correct this so I'm wondering, if I had mounted that vdi as a
secondary device on another VM, browsed the file system and delete
/etc/shadow would this have wiped all users passwords meaning I could
regain access again?

(This is past tense because its sorted now but I'm curious if this
would have worked? And if not, what could I have done?).

If you can edit /etc/shadow then you could have changed roots password.
Depending on your access (console required) you could have booted to
single-user mode and edited /etc/shadow that way.


I would not recommend deleting the /etc/shadow file at all... don't
think that would gain you access.


--
Best Regards,

Giles Coochey
NetSecSpec Ltd
NL T-Systems Mobile: +31 681 265 086
NL Mobile: +31 626 508 131
GIB Mobile: +350 5401 6693
Email/MSN/Live Messenger: giles@coochey.net
Skype: gilescoochey



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 02-02-2011, 02:06 PM
Robert Heller
 
Default Lost root access

At Wed, 2 Feb 2011 14:44:01 +0000 CentOS mailing list <centos@centos.org> wrote:

>
> So on a virtual server the root password was no longer working (as in
> I couldn't ssh in anymore). Only I and one other know it and neither
> of us have changed it. No other account had the correct privileges to
> correct this so I'm wondering, if I had mounted that vdi as a
> secondary device on another VM, browsed the file system and delete
> /etc/shadow would this have wiped all users passwords meaning I could
> regain access again?

No, it would not have. It would have resulted in NOONE having access.

What you could have done is chroot to the secondary device on the other
VM and then simply reset the root password with the passwd command.

>
> (This is past tense because its sorted now but I'm curious if this
> would have worked? And if not, what could I have done?).



>

--
Robert Heller -- 978-544-6933 / heller@deepsoft.com
Deepwoods Software -- http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/ www.asciiribbon.org -- against proprietary attachments



_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 12:53 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org