Rstudio Server authentication issues for non-linux users

Hello all, I am using the open source version of Rstudio Server on a CentOS 8 machine and logging in with the linux username works fine, but I can't log in with a non-linux username. The pamtester utility reports back successfully authenticated, but the same credentials don't work in Rstudio Server and I see this message in the log file:

Jun  4 08:02:29 usd1sapp101 rserver[54116]: ERROR database error 7 (sqlite3_statement_backend::loadOne: attempt to write a readonly database) [description: Could not insert revoked cookie into the database]; OCCURRED AT virtual rstudio::core::Error rstudio::core::database::Connection::execute(rstudio::core::database::Query&, bool*) src/cpp/core/Database.cpp:480; LOGGED FROM: void rstudio::server::auth::handler::invalidateAuthCookie(const string&, rstudio::core::ExponentialBackoffPtr) src/cpp/server/auth/ServerAuthHandler.cpp:550
Jun  4 08:02:37 usd1sapp101 rserver-pam[126042]: ERROR pam_acct_mgmt failed: Permission denied; LOGGED FROM: virtual int rstudio::core::system::PAM::login(const string&, const string&) src/cpp/server_core/system/Pam.cpp:201

Is this error fixable? How do I give it the proper permissions? Thanks in advance, Roger.

Can you post the output of the following commands? Does the user's HOME directory exist?

getent passwd <username>
pamtester -v rstudio <username> authenticate acct_mgmt open_session close_session

This assumes that you are using the default rstudio PAM module.

Will do and will show output.

Argh. When I try to include the output, I get a message that my post needs moderator approval.

Thanks so much for the reply. Here is the output:

[bosr ~]$ getent passwd bosr
bosr:*:1317039176:1317000513:Bos, Roger:/home/bosr:/bin/bash
[bosr ~]$ pamtester -v rstudio bosr authenticate acct_mgmt open_session close_session
pamtester: invoking pam_start(rstudio, bosr, ...)
pamtester: performing operation - authenticate
Password: 
pamtester: successfully authenticated
pamtester: performing operation - acct_mgmt
pamtester: Permission denied

I see that authenticate is working, but acct_mgmt is not working. Does that mean there is a problem in my /etc/pam.d/rstudio file?

I tried a second version without acct_mgmt and that showed success for all the other operations:

[bosr ~]$ pamtester -v rstudio bosr authenticate open_session close_session
pamtester: invoking pam_start(rstudio, bosr, ...)
pamtester: performing operation - authenticate
Password: 
pamtester: successfully authenticated
pamtester: performing operation - open_session
pamtester: sucessfully opened a session
pamtester: performing operation - close_session
pamtester: session has successfully been closed.

So that means everything is working except for acct_mgmt, correct? Now if I could just figure out to get acct_mgmt working...

SOLVED: Ok, according to this doc you can comment out the acct-mgmt checking. That worked for me, so I guess I am good now. I hope my days of working with PAM are over.

1 Like

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.