Linux – GNU screen locked, how to unlock

gnu-screenlinux

So here's what happened:

  • I ssh to the server with a normal user
  • I run sudo -i
  • I run screen

Then I accidentally locked the screen session. to unlock it, it asks for root's password not the password of the normal user. The problem is I don't know the password of root. What can I do in this case?

Best Answer

You can attach to the session from "another terminal" (including another ssh connection). That lets you recover anything that was in progress. You can always kill the screen session as you started it, by using sudo to kill the parent process of the screen session (the one named "screen").

The feature only is useful if it is properly configured to begin with (usually that is not the case).

Further reading:

Related Question