Hi Stephen,<div><br></div><div>The problem is caused by nscd. I reload the service and it works normally now:) Thanks!</div><div><br></div><div>P.S: I edit entry on the wiki of fusionforge to show the whole process, hope it may useful to other people. Here's the link:<a href="https://fusionforge.org/plugins/mediawiki/wiki/fusionforge/index.php/Configuration/NSS">https://fusionforge.org/plugins/mediawiki/wiki/fusionforge/index.php/Configuration/NSS</a>.</div>
<div><br><div class="gmail_quote">2012/4/14 Stephen Gran <span dir="ltr"><<a href="mailto:sgran@debian.org">sgran@debian.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<div class="im"><br>
This one time, at band camp, Coiby Xu said:<br>
</div>> Hi Stephen,<br>
<div class="im">><br>
> Thanks for you reply! Another thing is that if running "getent passwd<br>
> {shell_user}", it will not search for {shell_user} in database according to<br>
> log of pgsql but only in /etc/passwd.<br>
<br>
</div>Can you make sure you have these three entries (each one is one line, so<br>
if it wraps in your mail client make sure it doesn't wrap in the config<br>
file).<br>
<br>
allusers        = SELECT login AS username, passwd, gecos, ('/var/lib/gforge/chroot/home/users/' || login) AS homedir, shell, uid, gid FROM nss_passwd<br>
getpwuid        = SELECT login AS username, passwd, gecos, ('/var/lib/gforge/chroot/home/users/' || login) AS homedir, shell, uid, gid FROM nss_passwd WHERE uid = $1<br>
getpwnam        = SELECT login AS username, passwd, gecos, ('/var/lib/gforge/chroot/home/users/' || login) AS homedir, shell, uid, gid FROM nss_passwd WHERE login = $1<br>
<br>
This should allow you to run 'getent passwd' and 'getent passwd $user'.<br>
<br>
If a query doesn't hit postgres, it is getting an answer from somewhere.<br>
Are you running nscd?  If so, please disable it for the duration of<br>
testing - it (obviously, I suppose) caches answers and can skew testing.<br>
<div class="HOEnZb"><div class="h5"><br>
Cheers,<br>
--<br>
 -----------------------------------------------------------------<br>
|   ,''`.                                            Stephen Gran |<br>
|  : :' :                                        <a href="mailto:sgran@debian.org">sgran@debian.org</a> |<br>
|  `. `'                        Debian user, admin, and developer |<br>
|    `-                                     <a href="http://www.debian.org" target="_blank">http://www.debian.org</a> |<br>
 -----------------------------------------------------------------<br>
</div></div><br>-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v1.4.10 (GNU/Linux)<br>
<br>
iQIcBAEBCAAGBQJPiVF4AAoJELMRjO+K6o/u0OIQAOYHNPcTZo30auSplocX1Zcj<br>
MVa/m5kA7BTspPtgTVTdGM1hsY/VWQKXRdSouMKlXJ50Ad87q3LJDAOjoNIOXvVk<br>
2PBX5IzEtv8EraEKVhb29xnwNWWPJ+Puhi2f6fXPA4j2chT6jFkA1BSEKksWC6Ap<br>
ZWLL7L5kJCk5aiXThtHNOQEdft+sbiBw7qZ4Ik4t37Ag/jw6DOEYYkgzzbcsqKsx<br>
wgfIFVH6npOHd0RkOEwYniy2wtxxJfErbYU1+vtwF+Gj2KMd+qLjUpkb0OeGC4JV<br>
W9k6rNNF0ouceNfC0Ms4jphkvwVHqbTiUpzDg1hb8oIxShN07Eb5II4wOH2213F8<br>
w0Ls5VhpUwEu4d3aLPULjd81Tk4TcKUjk1T5Q8BWF57rXkYzb6b7jBgo9Rf5CebR<br>
I+0NWus4OSlZuOtN0ZvgyqxWyW9+SmkefCAf3M9DCOzWWDp+nVKbeKoQPW7gyVMa<br>
3DIgk85kX5uvwt0B+3j/3zaVdpn6KSqjm1C0a9DR2muUqfDb0eB9ELUM90TwxvrL<br>
OBVhwbotoz2EVa9CtmVJpvwXGo/nSmAhC4XD+/B67wHyFoL59/KaFL/pRUy+6BRJ<br>
7levLNDf0jDhwjFrInwxFc1g3jrX214pLEjlhCZhoDx248IBKUTC0+rJSuiiipA5<br>
0XPn1z6b3+/pSglD6bO8<br>
=Z2qP<br>
-----END PGP SIGNATURE-----<br>
<br></blockquote></div><br></div>