Package: libnss-pgsql1 Version: 1.3 Severity: normal Hello Maintainer,
I was using libnss-pgsql1 and libpam-pgsql under Woody and it was
working fine. Now, after dist-upgrade to Sarge I must go back to
files because nothing does work as expected...
Following Error occurs after a new installation of the Sarge basis
system plus postgresql 7.4.7:
createuser -A -D -P -E pampgsql
createdb --owner pampgsql system
psql -U pampgsql system
\i nss-pgsql.sql
Then I setup "nss" and "pam" (files attached).
After this I go on an allready open console and use
addgroup --debug tester1
Use of uninitialized value in numeric lt (<) at /usr/sbin/addgroup line 760.
Selecting from 1000 29999 ().
Adding group `tester1' (1000)...
/usr/sbin/groupadd -g 1000 tester1
Done.
to add a new group... Line adduser:760 is
760: return $min if ($min < $ids[0] || @ids==0);
maybe because the postgresql table is empty? If I repeat the addgroup
command, using /etc/group it returns ALL GIDs allready used.
Question 1: Why does it check the whole range in the PGSQL?
UID/GID from 0 to 999 should only checked from /etc/{passwd,group}
because they are Machine specific. UID/GID from 1000 and above are
for normal $USERS which can be handled by and backend.
OK, "addgroup" fails and put the new group in /etc/{group.gshadow}
and the "groups" table stay empty... If I try now
delgroup --debug tester1
/usr/sbin/delgroup: The group `tester1' does not exist.
oops... now it look into the PGSQL which is empty but addgroup has
put it into /etc/{group.gshadow}... Argh!!! OK, I continue...
I try again
addgroup --debug tester1
Use of uninitialized value in numeric lt (<) at /usr/sbin/addgroup line 760.
Selecting from 1000 29999 ().
Adding group `tester1' (1000)...
/usr/sbin/groupadd -g 1000 tester1
Done.
Hmmm adding a second line? A 'cat /etc/group' show me only one and the
Table is empty
OK, I remove the line manualy from /etc/{group.gshadow} and log into my
"system" Database and do a
INSERT INTO groups (name,gid) VALUES ('tester1',1000);
Then I repeat
addgroup --debug tester1
addgroup: The group `tester1' already exists.
Uff!!! Now it know, that I have added the group manaualy to my database.
OK, now let us remove this crap...
delgroup --debug tester1
Removing group `tester1'...
/usr/sbin/groupdel tester1
done.
There was nothing deleted from the Database.
OK, let us add a second group "tester2"
addgroup --debug tester2
Use of uninitialized value in numeric eq (==) at /usr/sbin/addgroup line 762.
Use of uninitialized value in numeric lt (<) at /usr/sbin/addgroup line 760.
Selecting from 1000 29999 (1000).
Adding group `tester2' (1001)...
/usr/sbin/groupadd -g 1001 tester2
Done.
Aha, how it finds the GID 1000 in the Database but addgroup give some
strange errors from two lines
759: while ($min <= $max) {
760: return $min if ($min < $ids[0] || @ids==0);
761: shift @ids if ($min > $ids[0]);
762: $min++ if ($min == $ids[0]);
Can you tell me whats going on here?
My whole Network (186 Computers) do not more work...
And last not least I have attached the postgresql.log (compressed)
I have only simply used "addgroup" and "delgroup", but they are the
same problems with "adduser" and "addgroup".
Thanks and Greetings
Michelle
-- System Information
Debian Release: 3.1
Kernel Version: Linux samba3.private 2.4.27-2-386 #1 Mon May 16 16:47:51 JST
2005 i686 GNU/Linux
Versions of the packages libnss-pgsql1 depends on:
account required pam_pgsql.so
auth required pam_pgsql.so
password required pam_pgsql.so
CREATE TABLE "groups" (
"name" character varying(32) NOT NULL,
"passwd" character varying(32),
"gid" serial NOT NULL UNIQUE,
"members" character varying,
PRIMARY KEY ("gid")
);
CREATE TABLE "accounts" (
"login" character varying(32) NOT NULL,
"passwd" character varying(32),
"uid" serial NOT NULL UNIQUE,
"gid" serial NOT NULL,
"gecos" character varying,
"homedir" character varying NOT NULL,
"shell" character varying DEFAULT '/bin/bash' NOT NULL,
"pwdexpire" timestamp,
"enabled" bool DEFAULT 't' NOT NULL,
"pwd_expired" bool DEFAULT 'f' NOT NULL,
"pwd_change" bool DEFAULT 'f' NOT NULL,
"subnet" character varying(8),
"modemserial" character varying(20),
"deleted" bool DEFAULT 'f',
PRIMARY KEY ("login")
);
CREATE TABLE "usergroups" (
"gid" int4 NOT NULL,
"uid" int4 NOT NULL,
PRIMARY KEY ("gid", "uid"),
CONSTRAINT "ug_gid_fkey" FOREIGN KEY ("gid") REFERENCES "groups"("gid"),
CONSTRAINT "ug_uid_fkey" FOREIGN KEY ("uid") REFERENCES
"accounts"("uid")
);
passwd: compat [NOTFOUND=continue SUCCESS=continue] pgsql group: compat [NOTFOUND=continue SUCCESS=continue] pgsql shadow: compat hosts: files dns networks: files protocols: db files services: db files ethers: db files rpc: db files netgroup: nis
host = localhost port = 5432 database = system login = pampgsql passwd = pampgsql passwdtable = accounts grouptable = groups groupmembertable = accounts JOIN usergroups ON accounts.uid=usergroups.uid JOIN groups ON usergroups.gid=groups.gid passwd_name = login passwd_passwd = passwd passwd_uid = uid passwd_gid = gid passwd_gecos = gecos passwd_dir = homedir passwd_shell = shell group_name = name group_passwd = passwd group_gid = gid group_member = members
host = localhost port = 5432 database = system user = pampgsql password = pampgsql table = accounts user_column = login pwd_column = passwd expired_column = pwd_expired newtok_column = pwd_change pwtype = md5 timeout = 30 debug
postgresql.log.gz
Description: Binary data

