LINUX - Get root access on machine

From GUILLARD WIKI
Revision as of 18:35, 30 May 2022 by Guillard (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

1 Get root access on unix machine with standard account ACCOUNT :

sudo chown ACCOUNT:ACCOUNT /etc/passwd
vi /etc/passwd

2 Add following line at the end of the file:

SIMBA:x:0:0:root:/root:/bin/bash

3 Save, try it out and set back rights as before

sudo su - SIMBA
sudo chown root:root /etc/passwd