You have access to the vim text editor via sudo, but shell escapes are blocked. How do you escalate privileges to get an unfettered root shell without sudo?
You have access to the vim text editor via sudo, but shell escapes are blocked. How do you escalate privileges to get an unfettered root shell without sudo?
@hal_pomeranz @away2thestars @mastodon.gamedev.place @piquant00
Not quite the same, but similar - at a former role working in an IA lab, while rotating root password on Solaris 10, we fat fingered the new phrase twice and got locked out of root.
I was able to use the low level OS on the Sun box to find the proper sector where the OS partition was and then mount it to boot into single user mode.
From there we edited the shadow file and cleared out the root password hash, saved, then shutdown single user mode and booted back into the proper OS, then sudo'd to root with no password, then changed the password using passwd.
That was a lot of fun.
"su" doesn't work on *buntu which has the root account disabled by default.