Hello all,<br><br>I have been looking in the archives that somebody talks about changing the username by using PAM (<a href="http://www.redhat.com/archives/pam-list/2008-November/msg00009.html">http://www.redhat.com/archives/pam-list/2008-November/msg00009.html</a>). <br>
<br>I am facing with the same problem. I would like to access using OpenSSH another machine in which there is a PAM module that carry out a change of user. Let me explain it better. What I am trying to do is:<br><ol><li>Through OpenSSH the user inputs as username 'anonymous' and password 'anonymous' too.<br>
</li><li>The PAM module tries to map 'guest' to 'system' and doesn't mind about the password.</li><li>The final result would be to see the prompt showing 'system@mycomputer$' and the corresponding folder mounted as the working one.</li>
</ol>This is the piece of code that is supposed to make the change of user:<br><br><font size="4"><tt>int pam_sm_authenticate(pam_handle_t *pamh,int flags,int argc,const char **argv)<br>
{<br>
   <br>int retval = pam_set_item(pamh, PAM_USER, "system");</tt><br>
</font>
<pre style="margin: 0em;"><font size="4">return PAM_SUCCESS;<br><br>}</font><br></pre><br>BUT the log says that 'anonymous' is not a valid user and it doesn't log as 'system'. My questions are:<br><br>
<ul><li>Despite the fact that I have created 'anonymous' as user, I haven't been capable of mapping the user 'system' with PAM.<br></li><li>I have taking a look to NSS (which is one of the solutions given in the previously mentioned thread) and don't know how does it fit in this structure. Am I wrong?<br>
</li><li>Is OpenSSH fault because it seems that doesn't take into account the change of user?</li><li>Is user mapping possible in this structure (OpenSSH + PAM)?</li></ul>I apologize for such a long mail but I just wanted to be accurate.<br>
<br>Thanks a lot<br>Have a great day<br><font size="4"><br><tt><br></tt></font><pre style="margin: 0em;"><font size="4"><br><font size="4"><br style="font-family: arial,helvetica,sans-serif;"></font></font><font size="4"><span style="font-family: arial,helvetica,sans-serif;"></span></font><font size="4"><br>
</font></pre><br>