Protecting a GNU screen session with a password is good security. However, how does one remove the password if you need to share a session with a colleague?

I tried the following to clear it and got locked out (I ought to have tested it before detaching, but...):

ctrl+a :password clear

So, what exactly is the password set to in the above scenario? Neither my previously set password nor my system account password would let me back in!


From man screen:

password [crypted_pw]

Present a crypted password in your ".screenrc" file and screen will ask for it, whenever someone attempts to resume a detached. This is useful if you have privileged programs running under screen and you want to protect your session from reattach attempts by another user masquerading as your uid (i.e. any superuser.) If no crypted password is specified, screen prompts twice for typing a password and places its encryption in the paste buffer. Default is `none', this disables password checking.

ctrl+a :password none should do what you want.

  • Thanks for quick response. Tested and it works! So, for the command I entered above, is there anyway I could have recovered from it? – AnthonyK Apr 22 '15 at 6:32
  • The short answer is: No. If this would work, you'd be able to recover any other password protected screen session. – FloHimself Apr 22 '15 at 7:02
  • Well, I was only thinking from the perspective of my command above: the [cryted_pw] was 'clear' in my case and this is what I was pondering on whether there could have been a way to recover. Oh well - at least I now know how to clear it! Much appreciated! – AnthonyK Apr 22 '15 at 7:13
  • The password is encrypted to secure the usage in files like ".screenrc", that is possibly readable by other users. So even if you know the encrypted password, clear in your case, you aren't able to easily recreate the clear text password from it. – FloHimself Apr 22 '15 at 7:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.