[LINUX] FIX Broken sudoers file - fourslickz/notes GitHub Wiki

Procedure

  1. Open two SSH sessions to the target server.
  2. In the first session, get the PID of bash by running:
echo $$
  1. In the second session, start the authentication agent with:
pkttyagent --process 29824
  1. Back in the first session, run:
sudo su -
  1. Enter the password in the second session password prompt.