Re: Forgotten SUSE Linux root Password
- From: ibuprofin@xxxxxxxxxxxxxxxxxxxxxx (Moe Trin)
- Date: Wed, 28 Dec 2005 21:03:14 -0600
On 28 Dec 2005, in the Usenet newsgroup comp.security.misc, in article
<43b31934$0$68650$dbd43001@xxxxxxxxxxxxxxx>, Frank Slootweg wrote:
>Dave wrote:
>> I don't use Linux, but do use Solaris, so perhaps things are a bit
>> different, but I doubt it.
No more than the differences between branded UNIXes. Yes, the warts may
be in slightly different locations, but the warts WILL BE THERE.
>> On a Solaris box, I'd do something like
>>
>> ok> boot cdrom -s // Boot into single use mode on CD
The assumption is that no password is set in the boot ROM preventing
this, but yes
>> # mkdir /tmp/foo
>> # mount /dev/dsk/c0t0d0s0 /tmp/a
ok> b -s
# mount -a
# vi /etc/passwd
# sync
# umount -a
# ^d
>> At this point, 'passwd' would edit the /etc/passwd, not those on the
>> old root partition which is in /tmp/a/etc/passwd
Yeah, I don't remember either SunOS or Solaris having the 'chroot'
command.
[compton ~]$ whatis chroot
chroot (1) - run command or interactive shell with special root directory
chroot (2) - change root directory
[compton ~]$
The O/P was talking about using the passwd command to change root's
password. That command of course doesn't take a file argument (neither
does 'vipw'), so the 'chroot' command is needed to change the system's
idea of what files are where. This isn't needed in boot to single user mode.
>Moe said: "In the case of Linux, you don't even need the rescue system
>disc.", so, AFAICT, he's talking about the real root partition and the
>normal passwd command accessing the real /etc/passwd file.
Exactly - quite similar to the 'b -s' at the 'ok' prompt. Bring it up
single user, and wail away. But for x86 hardware running Linux (and
FreeBSD), I've got systems-on-a-floppy (a very _over-stuffed_ floppy,
but a standard 3.5 inch "1.44" none the less) that can be used as a
rescue system as well. For Linux, google for 'tomsrtbt'.
> Like you, I don't use Linux, but HP-UX. On HP-UX I would boot into ISL
>(Initial System Loader) [1] and do:
>
>ISL> hpux -is
>
> That would boot into (real) single user mode (init state 's') and give
>me a root prompt:
Yup.
>[1] Yes, there's additional security/protection, but also that can be
>circumvented.
Same here, both in SunOS/Solaris and Linux. No need to elaborate. The
standard comment I use is "Physical access beats 5 aces, every time."
>> # vi /tmp/a/etc/shadow
>>
>> I'm not sure how one could *easily* use /bin/passwd to edit the file on
>> the file system at this point.
Lacking the 'chroot' command above, I don't know how easy it might be
either. Would a soft link work? I don't see why not off the top of the
head.
>> At the end of the day, it is all a bit of a non-issue, as it is so easy
>> to use vi to do it!!
Yup
> Well, actually using vi is more complex, at least on HP-UX, because
>it's in /usr/bin and /usr is normally a mounted filesystem, which may be
>down, corrupt, <whatever>.
You got a shell - virtually every one I've worked with have 'echo' and
redirection.
> Also in HP-UX, the passwd command can specify a file other than
>/etc/passwd, so even in your example case there still would be no need
>for vi! :-) (And of course HP-UX also has /etc/shadow-like
>functionality.)
Wonder why they have that capability. What need does it fulfill?
"/etc/passwd" and "/etc/shadow" should always be "there", and not off
on the South 40 someplace.
Old guy
.
- Follow-Ups:
- Re: Forgotten SUSE Linux root Password
- From: Frank Slootweg
- Re: Forgotten SUSE Linux root Password
- From: Dave
- Re: Forgotten SUSE Linux root Password
- References:
- Forgotten SUSE Linux root Password
- From: Ludovic Joly
- Re: Forgotten SUSE Linux root Password
- From: Moe Trin
- Re: Forgotten SUSE Linux root Password
- From: Dave
- Re: Forgotten SUSE Linux root Password
- From: Frank Slootweg
- Re: Forgotten SUSE Linux root Password
- From: Dave
- Re: Forgotten SUSE Linux root Password
- From: Frank Slootweg
- Forgotten SUSE Linux root Password
- Prev by Date: Black Hat Federal and Europe Call for Papers
- Next by Date: Re: Forgotten SUSE Linux root Password
- Previous by thread: Re: Forgotten SUSE Linux root Password
- Next by thread: Re: Forgotten SUSE Linux root Password
- Index(es):
Relevant Pages
|
|