[R studio server] Incorrect or invalid username/password + pam authenticate failed

I updated Ubuntu from 14.04 to 16.04 to follow system recommandation and to defence meltdown and spectre.

And after update, i cannot login.

Logs is here:


R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"
Copyright (C) 2015 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.3 LTS

 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

R studio server status

$ rstudio-server version


Jan 15 18:32:26 elepant-carol rserver-pam[24102]: ERROR pam_authenticate failed: System error; LOGGED FROM: virtual int rstudio::core::system::PAM::login(const string&, const string&) /home/ubuntu/rstudio/src/cpp/core/system/Pam.cpp:189
Jan 15 18:32:26 elepant-carol kernel: [20558.725341] audit: type=1400 audit(1516008746.940:30): apparmor="DENIED" operation="capable" profile="/usr/lib/rstudio-server/bin/rserver" pid=24102 comm="rserver-pam" capability=29  capname="audit_write"


Jan 15 18:32:26 elepant-carol rserver-pam[24102]: PAM audit_log_acct_message() failed: Operation not permitted

Also i copied /etc/pam.d/login to /etc/pam.d/rstudio, but it does not work.

How can i fix?

append 01.17

sudo pamtester --verbose rstudio {user} authenticate acct_mgmt

pamtester: invoking pam_start(rstudio, nrlab, ...)
pamtester: performing operation - authenticate
pamtester: successfully authenticated
pamtester: performing operation - acct_mgmt
pamtester: account management done.

Hi @theodore.skku, what is the PAM module you trying to integrate to? Is it LDAP?

Hello @edgararuiz, Thanks you for your reply.

No, I did not any integration. I just upgrade R studio server to 1.1.383. R is still 3.4.3.

But after upgrade the studio occurred PAM error.

I downgraded the studio, and the error is still occurred.

...is it problem on Ubuntu 16.04?


Um, well, finally, I solved myself.

This problem is apparmor.

Apparmor blocked rserver.

sudo aa-status

apparmor module is loaded.
48 profiles are loaded.
11 profiles are in enforce mode.

And i run command aa-remove-unknown

sudo aa-remove-unknown

Removing '/usr/lib/rstudio-server/bin/rserver'
Removing 'docker-default'

The rserver acquires permission to use PAM.

It seems that even apparmor dones not know why it has blocked.

Anyway, thanks!


1 Like