Score:0

rstudio-server "unauthorized user" error on google vm

ge flag
HBi

I have a Google VM with Rstudio server installed. Everything was working fine and I was able to get in with my username and password. I haven't used this VM for a couple months and now I tried again. I am getting the Rstudio login page when typing <server-ip-address>:8787, but when I enter my username and password I get the "unauthorized user" error. I'm not sure what changed.

The only similar post I found was this Cannot log in to AWS RStudio Server and Workbench, instead see 'Error: Unauthorized user.', which turned out to be an AWS problem.

I can SSH into the server with my user. It is not a password problem (since then you get a different error). Any suggestions?

Score:0
ge flag
HBi

This is how I solved it:

First, I checked the rstudio-server log file:

sudo cat /var/log/rstudio/rstudio-server/rserver.log

where I found the following message:

WARNING User user_name could not be authenticated because they do not belong to one of the required groups (analysts,admins,rstudio-users); LOGGED FROM: bool rstudio::server::auth::validateUser(const string&, const string&, unsigned int, bool) src/cpp/server/auth/ServerValidateUser.cpp:125

When trying to add my user to one of the groups analysts,admins,rstudio-users, I found that none of them exist in my system. So first I added a new group called rstudio-users:

sudo groupadd rstudio-users

Then I added my user to the group:

sudo usermod -a -G rstudio-users user_name

And then I restarted rstudio-server:

sudo systemctl restart rstudio-server

And that solved it.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.