Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Regain access to old IO device

by bliako (Monsignor)
on Jan 11, 2023 at 10:48 UTC ( [id://11149519]=note: print w/replies, xml ) Need Help??


in reply to Regain access to old IO device

in the meantime just boot the device from somewhere you do have root access, say a livecd, mount the disk and erase root's password hash in the (shadow) password file.

Replies are listed 'Best First'.
Re^2: Regain access to old IO device
by afoken (Chancellor) on Jan 11, 2023 at 18:59 UTC

    With access to the bootloader, you probably don't even need a second boot medium. Just passing init=/bin/sh as extra kernel parameter should give you a root shell with / mounted ro, and not much else. mount -o remount,rw / makes / writable. Then do whatever you like (probably mount /proc and /sys). Unmount everything you mounted. After that, there are two ways to cleanly exit: mount -o remount,ro / followed by exec /sbin/init just boots into the regular init. Alternatively, sync once or twice, then reboot the hard way (Ctrl-Alt-Del or reset button or power cycle).

    BTW: Because messing with the bootloader is so easy, paranoid people lock down the bootloader and prevent physical access to the computer.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11149519]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2024-04-19 01:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found