<p dir="ltr">Does this happen on CentOS 7? It may be that this fix was not back-ported to 5.11 (that's fairly old now).</p>
<p dir="ltr">If you apply the patch documented in the bug report does 5.1 start to work?</p>
<p dir="ltr">Matt</p>
<div class="gmail_quote">On May 9, 2015 9:38 PM, "Scott Packard" <<a href="mailto:spackard@gmail.com">spackard@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> ssh localhost<br>
$ cat /tmp/outfile<br>
/usr/local/src/test.sh is running at Sat May 9 20:56:37 PDT 2015<br>
PAM_SERVICE=sshd<br>
PAM_RHOST=localhost.localdomain<br>
PAM_USER=packard<br>
PAM_TYPE=auth<br>
PAM_TTY=ssh<br>
<br>
> gnome login<br>
/usr/locaGUI l/src/test.sh is running at Sat May 9 20:58:30 PDT 2015<br>
PAM_SERVICE=gdm<br>
PAM_TYPE=auth<br>
PAM_TTY=:0<br>
<br>
<br>
On a CentOS5.11 x64 host, fully patched,<br>
during authentication, I've shimmed a pam_exec call to a simple script that<br>
env | grep PAM >> /tmp/outfile<br>
<br>
If I'm already logged in, and ssh localhost, then PAM_USER is set,<br>
but if I log out, then try logging in via GNOME, PAM_USER is not set.<br>
<br>
<br>
This works on CentOS6 and Solaris 10x64.<br>
There was a bug reported about this on an earlier pam rpm, but was fixed in 2013<br>
and I have the latest pam rpm, pam-0.99.6.2-12.el5, which was in at<br>
least RHEL5.9.<br>
Any idea why?<br>
Has anyone bumped into this?<br>
I thought maybe it was an anomaly on another machine so I spent time tonight<br>
building up a fresh CentOS5.11x64 install into virtualbox. No change.<br>
<br>
Regards, Scott<br>
<br>
</blockquote></div>