Physical access

From dankwiki
Revision as of 04:58, 29 May 2020 by Dank (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

So you've got physical access to a UNIX box. How do you get root access?

Removing root password

This requires that the filesystem containing /etc is not encrypted. Remove the disk with the filesystem containing /etc, and mount it on another machine.

  • Edit /etc/passwd, and remove the second field for the root entry:


  • Edit /etc/shadow, and do the same:


  • If you intend to set a new root password using passwd, it's recommended to add an 'x' back to the /etc/passwd, so that /etc/shadow is used again:


Bypassing login