[Nsspampgsql-devel] error with " DECLARE nss_pgsql_internal_allusers_curs SCROLL CURSOR FOR FOR READ ONLY"

Stephen Gran sgran at debian.org
Sat Apr 14 10:29:12 UTC 2012


Hi,

This one time, at band camp, Coiby Xu said:
> Hi Stephen,
> 
> Thanks for you reply! Another thing is that if running "getent passwd
> {shell_user}", it will not search for {shell_user} in database according to
> log of pgsql but only in /etc/passwd.

Can you make sure you have these three entries (each one is one line, so
if it wraps in your mail client make sure it doesn't wrap in the config
file).

allusers        = SELECT login AS username, passwd, gecos, ('/var/lib/gforge/chroot/home/users/' || login) AS homedir, shell, uid, gid FROM nss_passwd
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
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

This should allow you to run 'getent passwd' and 'getent passwd $user'.

If a query doesn't hit postgres, it is getting an answer from somewhere.
Are you running nscd?  If so, please disable it for the duration of
testing - it (obviously, I suppose) caches answers and can skew testing.

Cheers,
-- 
 -----------------------------------------------------------------
|   ,''`.                                            Stephen Gran |
|  : :' :                                        sgran at debian.org |
|  `. `'                        Debian user, admin, and developer |
|    `-                                     http://www.debian.org |
 -----------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/nsspampgsql-devel/attachments/20120414/6a851043/attachment-0001.pgp>


More information about the Nsspampgsql-devel mailing list