LINUX - Get root access on machine
Revision as of 18:34, 30 May 2022 by Guillard (talk | contribs) (Created page with "1 Get root access on unix machine with standard account : <syntaxhighlight lang="linux"> sudo chown ACCOUNT:ACCOUNT /etc/passwd vi /etc/passwd </syntaxhighlight> 2 Add following line at the end of the file: <syntaxhighlight lang="linux"> SIMBA:x:0:0:root:/root:/bin/bash </syntaxhighlight> 3 Save, try it out and set back rights as before <syntaxhighlight lang="linux"> sudo su - SIMBA sudo chown root:root /etc/passwd </syntaxhighlight>")
1 Get root access on unix machine with standard 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