title: Permission denied when using PAM login for RStudio Server
body: <p>I cannot log into RStudio Server using my username through PAM. The login returned an "Error: Incorrect or invalid username/password" error. I've copied and overwritten <code>/etc/pam.d/rstudio</code> with <code>/etc/pam.d/login</code>.</p>
  
  <p>In <code>/var/log/syslog</code>, the error is logged as:</p>
  
  <pre><code>rserver[10096]: ERROR system error 13 (Permission denied) [user-value=&lt;my username&gt;]; OCCURRED AT: rstudio::core::Error rstudio::core::system::user::{anonymous}::userFrom(const boost::function&lt;int(T, passwd*, char*, long unsigned int, passwd**)&gt;&amp;, T, rstudio::core::system::user::User*) [with T = const char*] /home/ubuntu/rstudio/src/cpp/core/system/PosixUser.cpp:107; LOGGED FROM: std::string rstudio::server::pam_auth::{anonymous}::userIdentifierToLocalUsername(const string&amp;) /home/ubuntu/rstudio/src/cpp/server/ServerPAMAuth.cpp:175
  </code></pre>
  
  <p><code>sudo rstudio-server verify-installation</code> returns no error.</p>
  
  <p><code>sudo pamtester --verbose rstudio &lt;my username&gt; authenticate</code> logs in successfully with no error.</p>
  
  <p>How can I solve this problem?</p>