How to recover username and password in R-Studio Server?

Hi, I am using R-Studio Server in a virtual machine on Google Compute Engine. I have followed this tutorial to setup my VM and R-studio in it. In page 6 there are steps for creating an user and password that you can later use to access R-Studio through port 8787. I have done it and everything was working fine. One month into the future (now) I have forgotten my username and password and cannot log back in R-Studio Server. How can I recover/reset those? I have found this question, but it does not solve my issue since I have created a different user that now I cannot remember. Thanks in advance for your help!

You log in into RStudio Server with a system user, if you have sudo access to your VM you can change the password for any user with this command

sudo passwd {userNameHere}
1 Like

Thanks! That's useful. For those like me that did not remember their usernames as well, you can run the following command to list users:

cat /etc/passwd

Further instructions are available here, for instance.
After figuring out you username, you can go ahead and change the password as detailed above.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.