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


#1

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+sessionInfo()

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

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
 [9] LC_ADDRESS=C               LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

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

R studio server status

$ rstudio-server version
1.1.383

/var/log/syslog

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"

/var/log/auth

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
Password:
pamtester: successfully authenticated
pamtester: performing operation - acct_mgmt
pamtester: account management done.

#2

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


#3

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?

theodore


#4

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.
   /sbin/dhclient
   /usr/lib/NetworkManager/nm-dhcp-client.action
   /usr/lib/NetworkManager/nm-dhcp-helper
   /usr/lib/chromium-browser/chromium-browser//browser_java
   /usr/lib/chromium-browser/chromium-browser//browser_openjdk
   /usr/lib/chromium-browser/chromium-browser//sanitized_helper
   /usr/lib/connman/scripts/dhclient-script
   /usr/lib/rstudio-server/bin/rserver
   /usr/lib/rstudio-server/bin/rserver//restricted
   /usr/sbin/tcpdump

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!

theodore