First of all, congratulations for a very good project.
Unlike most, perhaps, I'm more interested in the group support than the passwd or shadow integration. I want to use this module with Cyrus IMAPD and Horde to define the groups for mail access.
At home I'm using the libnss-mysql 1.1 with gentoo 2004.0 and cyrus-imapd 2.2.3 and with works like a charm - I'm using the included versions. At work, I'm using the libnss-mysql 1.2 and cyrus-imapd 2.2.3 - compiled by me, since SuSE doesn't provide them. Unfortunately, I'm unable to convince SuSE 9.0 Professional to use the getgrnam and getgrgid functions. Let me explain:
I've compiled the package and installed it without any problem. I've created the libnss-mysql.cfg and libnss-mysql-root.cfg files and updated nsswitch.conf. I'm posting the files in the bottom of this message.
I'm able to get the list of groups that exist in the system, including the ones on the mysql database with getent group:
Can anyone help? Any tips for debugging or for recompiling libnss_mysql? If you need more info, please ask. I will greatly appreciate any help since I'm blocked. :-(
Thank you.
[queries]
getpwnam SELECT username,'x',uid,gid,gecos,homedir,shell FROM users WHERE username='%s' LIMIT 1
getpwuid SELECT username,'x',uid,gid,gecos,homedir,shell FROM users WHERE uid='%u' LIMIT 1
getspnam SELECT username,password,lstchg,min,max,warn,inact,expire,flag FROM users WHERE username='%s' LIMIT 1
getpwent SELECT username,'x',uid,gid,gecos,homedir,shell FROM users
getspent SELECT username,password,lstchg,min,max,warn,inact,expire,flag FROM users
getgrnam SELECT name,password,gid FROM groups WHERE name='%s' LIMIT 1
getgrgid SELECT name,password,gid FROM groups WHERE gid='%u' LIMIT 1
getgrent SELECT name,password,gid FROM groups
memsbygid SELECT username FROM grouplist WHERE gid='%u'
gidsbymem SELECT gid FROM grouplist where username='%s'
[server]
host localhost
database mail
username user
password password
#socket /var/lib/mysql/mysql.sock
#port 3306
timeout 3
compress 0
#initcmd sql-statement-here
And I've only changed the identification for the libnss-mysql-root.cfg file:
[server]
username my-user
password my-password
I've also added the mysql support to the group, shadow and password databases, although I'm convinced I only need the group:
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
# compat Use compatibility setup
# nisplus Use NIS+ (NIS version 3)
# nis Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# db Use the /var/db databases
# [NOTFOUND=return] Stop searching if not found so far
#
# For more information, please read the nsswitch.conf.5 manual page.
#
Can you try libnss 1.1 on suse, just in case there's a problem with 1.2?
Also, what's your glibc version on both boxes (ls -l /lib/libc-*)? Might be good to know gcc version and mysql versions as well.
An 'ltrace -S getent group cd' may also prove useful ..tho you may want to sling that into an email (cinergi@users.sourceforge.net).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For anyone interested in this problem, the solution was simple: disable nscd! I was convinced that I had done it, but appearantly was lost in the way! :-)
Thanks Ben for the help.
Jorge.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
First of all, congratulations for a very good project.
Unlike most, perhaps, I'm more interested in the group support than the passwd or shadow integration. I want to use this module with Cyrus IMAPD and Horde to define the groups for mail access.
At home I'm using the libnss-mysql 1.1 with gentoo 2004.0 and cyrus-imapd 2.2.3 and with works like a charm - I'm using the included versions. At work, I'm using the libnss-mysql 1.2 and cyrus-imapd 2.2.3 - compiled by me, since SuSE doesn't provide them. Unfortunately, I'm unable to convince SuSE 9.0 Professional to use the getgrnam and getgrgid functions. Let me explain:
I've compiled the package and installed it without any problem. I've created the libnss-mysql.cfg and libnss-mysql-root.cfg files and updated nsswitch.conf. I'm posting the files in the bottom of this message.
I'm able to get the list of groups that exist in the system, including the ones on the mysql database with getent group:
---------------------------------------------------
apolo ~ # getent group
root❌0:
bin❌1:daemon
....
nobody❌65533:nobody
nogroup❌65534:nobody
users❌100:
vscan❌101:
cd❌50000:u230039,u230046
cc❌50001:u230034,u230046
cp❌50002:u230028,u230046
sec❌50003:u230039,u230077
sect❌50009:u230046
it❌50030:u230077,u230005
gre❌50050:u230046
all❌60000:u230028,u230034,u230039,u230046,u230077,u230005
apolo ~ #
---------------------------------------------------
But when I try to get a specific group, I'm unable to retrieve any information:
---------------------------------------------------
apolo ~ # getent group cd
apolo ~ #
or
apolo ~ # getent group 50000
apolo ~ #
---------------------------------------------------
At home, both queries work.
The result of ltrace the queries is:
---------------------------------------------------
apolo ~ # ltrace getent group
__libc_start_main(0x0804b140, 2, 0xbffff674, 0x0804b2c0, 0x0804b320 <unfinished ...>
setlocale(6, "") = "en_US"
textdomain("libc") = "libc"
__dcgettext("libc", "getent - get entries from admini"..., 5) = "getent - get entries from admini"...
__dcgettext("libc", "Supported databases:", 5) = "Supported databases:"
strlen("getent - get entries from admini"...) = 50
strlen("Supported databases:") = 20
strlen("ahosts") = 6
strlen("aliases") = 7
strlen("ethers") = 6
strlen("group") = 5
strlen("hosts") = 5
strlen("netgroup") = 8
strlen("networks") = 8
strlen("passwd") = 6
strlen("protocols") = 9
strlen("rpc") = 3
strlen("services") = 8
strlen("shadow") = 6
malloc(162) = 0x0804e618
__stpcpy(0x0804e618, 0x0804b740, 5, 0x0804e618, 0x0804b594) = 0x0804e64a
__stpcpy(0x0804e64b, 0x0804b594, 5, 0x0804e618, 0x0804b594) = 0x0804e65f
strlen("ahosts") = 6
__mempcpy(0x0804e660, 0x0804b557, 6, 0x0804e618, 0x0804b594) = 0x0804e666
strlen("aliases") = 7
__mempcpy(0x0804e667, 0x0804b55e, 7, 0x0804e618, 0x0804b594) = 0x0804e66e
strlen("ethers") = 6
__mempcpy(0x0804e66f, 0x0804b4b1, 6, 0x0804e618, 0x0804b594) = 0x0804e675
strlen("group") = 5
__mempcpy(0x0804e676, 0x0804b504, 5, 0x0804e618, 0x0804b594) = 0x0804e67b
strlen("hosts") = 5
__mempcpy(0x0804e67c, 0x0804b558, 5, 0x0804e618, 0x0804b594) = 0x0804e681
strlen("netgroup") = 8
__mempcpy(0x0804e682, 0x0804b501, 8, 0x0804e618, 0x0804b594) = 0x0804e68a
strlen("networks") = 8
__mempcpy(0x0804e68b, 0x0804b566, 8, 0x0804e618, 0x0804b594) = 0x0804e693
strlen("passwd") = 6
__mempcpy(0x0804e694, 0x0804b56f, 6, 0x0804e618, 0x0804b594) = 0x0804e69a
strlen("protocols") = 9
__mempcpy(0x0804e69b, 0x0804b576, 9, 0x0804e618, 0x0804b594) = 0x0804e6a4
strlen("rpc") = 3
__mempcpy(0x0804e6a5, 0x0804b580, 3, 0x0804e618, 0x0804b594) = 0x0804e6a8
strlen("services") = 8
__mempcpy(0x0804e6a9, 0x0804b584, 8, 0x0804e618, 0x0804b594) = 0x0804e6b1
strlen("shadow") = 6
__mempcpy(0x0804e6b2, 0x0804b58d, 6, 0x0804e618, 0x0804b594) = 0x0804e6b8
argp_parse(0x0804c7a4, 2, 0xbffff674, 0, 0xbffff618) = 0
strcmp("group", "group") = 0
setgrent(0x4002c54c, 3, 0xbffff7d3, 1, 0xbffff628) = 0x40153360
getgrent(0x4002c54c, 3, 0xbffff7d3, 1, 0xbffff628) = 0x4015421c
printf("%s:%s:%ld:", "root", "x", 0) = 9
__overflow(0x4014fd80, 10, 0x0804fbd5, 0, 0xbffff628root❌0:
) = 10
getgrent(0x4014fd80, 10, 0x0804fbd5, 0, 0xbffff628) = 0x4015421c
printf("%s:%s:%ld:", "bin", "x", 1) = 8
fputs_unlocked(0x0804fbd8, 0x4014fd80, 0x0804fbd4, 1, 0xbffff628) = 1
__overflow(0x4014fd80, 10, 0x0804fbd4, 1, 0xbffff628bin❌1:daemon
) = 10
...
getgrent(0x4014fd80, 10, 0x0804fbd8, 71, 0xbffff628) = 0x4015421c
printf("%s:%s:%ld:", "nobody", "x", 65533) = 15
fputs_unlocked(0x0804fbdf, 0x4014fd80, 0x0804fbd7, 65533, 0xbffff628) = 1
__overflow(0x4014fd80, 10, 0x0804fbd7, 65533, 0xbffff628nobody❌65533:nobody
) = 10
getgrent(0x4014fd80, 10, 0x0804fbd7, 65533, 0xbffff628) = 0x4015421c
printf("%s:%s:%ld:", "nogroup", "x", 65534) = 16
fputs_unlocked(0x0804fbe0, 0x4014fd80, 0x0804fbd8, 65534, 0xbffff628) = 1
__overflow(0x4014fd80, 10, 0x0804fbd8, 65534, 0xbffff628nogroup❌65534:nobody
) = 10
getgrent(0x4014fd80, 10, 0x0804fbd8, 65534, 0xbffff628) = 0x4015421c
printf("%s:%s:%ld:", "users", "x", 100) = 12
__overflow(0x4014fd80, 10, 0x0804fbd6, 100, 0xbffff628users❌100:
) = 10
getgrent(0x4014fd80, 10, 0x0804fbd6, 100, 0xbffff628) = 0x4015421c
printf("%s:%s:%ld:", "vscan", "x", 101) = 12
__overflow(0x4014fd80, 10, 0x0804fbd6, 101, 0xbffff628vscan❌101:
) = 10
getgrent(0x4014fd80, 10, 0x0804fbd6, 101, 0xbffff628) = 0
endgrent() = <void>
+++ exited (status 0) +++
apolo ~ #
---------------------------------------------------
and for a compat group
---------------------------------------------------
apolo ~ # ltrace getent group root
__libc_start_main(0x0804b140, 3, 0xbffff664, 0x0804b2c0, 0x0804b320 <unfinished ...>
setlocale(6, "") = "en_US"
textdomain("libc") = "libc"
__dcgettext("libc", "getent - get entries from admini"..., 5) = "getent - get entries from admini"...
__dcgettext("libc", "Supported databases:", 5) = "Supported databases:"
strlen("getent - get entries from admini"...) = 50
strlen("Supported databases:") = 20
strlen("ahosts") = 6
strlen("aliases") = 7
strlen("ethers") = 6
strlen("group") = 5
strlen("hosts") = 5
strlen("netgroup") = 8
strlen("networks") = 8
strlen("passwd") = 6
strlen("protocols") = 9
strlen("rpc") = 3
strlen("services") = 8
strlen("shadow") = 6
malloc(162) = 0x0804e618
__stpcpy(0x0804e618, 0x0804b740, 5, 0x0804e618, 0x0804b594) = 0x0804e64a
__stpcpy(0x0804e64b, 0x0804b594, 5, 0x0804e618, 0x0804b594) = 0x0804e65f
strlen("ahosts") = 6
__mempcpy(0x0804e660, 0x0804b557, 6, 0x0804e618, 0x0804b594) = 0x0804e666
strlen("aliases") = 7
__mempcpy(0x0804e667, 0x0804b55e, 7, 0x0804e618, 0x0804b594) = 0x0804e66e
strlen("ethers") = 6
__mempcpy(0x0804e66f, 0x0804b4b1, 6, 0x0804e618, 0x0804b594) = 0x0804e675
strlen("group") = 5
__mempcpy(0x0804e676, 0x0804b504, 5, 0x0804e618, 0x0804b594) = 0x0804e67b
strlen("hosts") = 5
__mempcpy(0x0804e67c, 0x0804b558, 5, 0x0804e618, 0x0804b594) = 0x0804e681
strlen("netgroup") = 8
__mempcpy(0x0804e682, 0x0804b501, 8, 0x0804e618, 0x0804b594) = 0x0804e68a
strlen("networks") = 8
__mempcpy(0x0804e68b, 0x0804b566, 8, 0x0804e618, 0x0804b594) = 0x0804e693
strlen("passwd") = 6
__mempcpy(0x0804e694, 0x0804b56f, 6, 0x0804e618, 0x0804b594) = 0x0804e69a
strlen("protocols") = 9
__mempcpy(0x0804e69b, 0x0804b576, 9, 0x0804e618, 0x0804b594) = 0x0804e6a4
strlen("rpc") = 3
__mempcpy(0x0804e6a5, 0x0804b580, 3, 0x0804e618, 0x0804b594) = 0x0804e6a8
strlen("services") = 8
__mempcpy(0x0804e6a9, 0x0804b584, 8, 0x0804e618, 0x0804b594) = 0x0804e6b1
strlen("shadow") = 6
__mempcpy(0x0804e6b2, 0x0804b58d, 6, 0x0804e618, 0x0804b594) = 0x0804e6b8
argp_parse(0x0804c7a4, 3, 0xbffff664, 0, 0xbffff608) = 0
strcmp("group", "group") = 0
__ctype_b_loc(0x4002c54c, 3, 0xbffff7ce, 1, 0xbffff618) = 0x40155938
getgrnam("root") = 0x40154274
printf("%s:%s:%ld:", "root", "x", 0) = 9
__overflow(0x4014fd80, 10, 0x0804e6c9, 0, 0x40155938root❌0:
) = 10
+++ exited (status 0) +++
---------------------------------------------------
, but for a mysql group
---------------------------------------------------
apolo ~ # ltrace getent group cd
__libc_start_main(0x0804b140, 3, 0xbffff664, 0x0804b2c0, 0x0804b320 <unfinished ...>
setlocale(6, "") = "en_US"
textdomain("libc") = "libc"
__dcgettext("libc", "getent - get entries from admini"..., 5) = "getent - get entries from admini"...
__dcgettext("libc", "Supported databases:", 5) = "Supported databases:"
strlen("getent - get entries from admini"...) = 50
strlen("Supported databases:") = 20
strlen("ahosts") = 6
strlen("aliases") = 7
strlen("ethers") = 6
strlen("group") = 5
strlen("hosts") = 5
strlen("netgroup") = 8
strlen("networks") = 8
strlen("passwd") = 6
strlen("protocols") = 9
strlen("rpc") = 3
strlen("services") = 8
strlen("shadow") = 6
malloc(162) = 0x0804e618
__stpcpy(0x0804e618, 0x0804b740, 5, 0x0804e618, 0x0804b594) = 0x0804e64a
__stpcpy(0x0804e64b, 0x0804b594, 5, 0x0804e618, 0x0804b594) = 0x0804e65f
strlen("ahosts") = 6
__mempcpy(0x0804e660, 0x0804b557, 6, 0x0804e618, 0x0804b594) = 0x0804e666
strlen("aliases") = 7
__mempcpy(0x0804e667, 0x0804b55e, 7, 0x0804e618, 0x0804b594) = 0x0804e66e
strlen("ethers") = 6
__mempcpy(0x0804e66f, 0x0804b4b1, 6, 0x0804e618, 0x0804b594) = 0x0804e675
strlen("group") = 5
__mempcpy(0x0804e676, 0x0804b504, 5, 0x0804e618, 0x0804b594) = 0x0804e67b
strlen("hosts") = 5
__mempcpy(0x0804e67c, 0x0804b558, 5, 0x0804e618, 0x0804b594) = 0x0804e681
strlen("netgroup") = 8
__mempcpy(0x0804e682, 0x0804b501, 8, 0x0804e618, 0x0804b594) = 0x0804e68a
strlen("networks") = 8
__mempcpy(0x0804e68b, 0x0804b566, 8, 0x0804e618, 0x0804b594) = 0x0804e693
strlen("passwd") = 6
__mempcpy(0x0804e694, 0x0804b56f, 6, 0x0804e618, 0x0804b594) = 0x0804e69a
strlen("protocols") = 9
__mempcpy(0x0804e69b, 0x0804b576, 9, 0x0804e618, 0x0804b594) = 0x0804e6a4
strlen("rpc") = 3
__mempcpy(0x0804e6a5, 0x0804b580, 3, 0x0804e618, 0x0804b594) = 0x0804e6a8
strlen("services") = 8
__mempcpy(0x0804e6a9, 0x0804b584, 8, 0x0804e618, 0x0804b594) = 0x0804e6b1
strlen("shadow") = 6
__mempcpy(0x0804e6b2, 0x0804b58d, 6, 0x0804e618, 0x0804b594) = 0x0804e6b8
argp_parse(0x0804c7a4, 3, 0xbffff664, 0, 0xbffff608) = 0
strcmp("group", "group") = 0
__ctype_b_loc(0x4002c54c, 3, 0xbffff7d0, 1, 0xbffff618) = 0x40155938
getgrnam("cd") = NULL
+++ exited (status 2) +++
apolo ~ #
---------------------------------------------------
Can anyone help? Any tips for debugging or for recompiling libnss_mysql? If you need more info, please ask. I will greatly appreciate any help since I'm blocked. :-(
Thank you.
Jorge Manuel B. S. Vicetto
Here are my configuration files, as promised :-)
----------------- Configuration files -----------------
I'm using the original libnss-mysql.cfg file:
[queries]
getpwnam SELECT username,'x',uid,gid,gecos,homedir,shell FROM users WHERE username='%s' LIMIT 1
getpwuid SELECT username,'x',uid,gid,gecos,homedir,shell FROM users WHERE uid='%u' LIMIT 1
getspnam SELECT username,password,lstchg,min,max,warn,inact,expire,flag FROM users WHERE username='%s' LIMIT 1
getpwent SELECT username,'x',uid,gid,gecos,homedir,shell FROM users
getspent SELECT username,password,lstchg,min,max,warn,inact,expire,flag FROM users
getgrnam SELECT name,password,gid FROM groups WHERE name='%s' LIMIT 1
getgrgid SELECT name,password,gid FROM groups WHERE gid='%u' LIMIT 1
getgrent SELECT name,password,gid FROM groups
memsbygid SELECT username FROM grouplist WHERE gid='%u'
gidsbymem SELECT gid FROM grouplist where username='%s'
[server]
host localhost
database mail
username user
password password
#socket /var/lib/mysql/mysql.sock
#port 3306
timeout 3
compress 0
#initcmd sql-statement-here
And I've only changed the identification for the libnss-mysql-root.cfg file:
[server]
username my-user
password my-password
I've also added the mysql support to the group, shadow and password databases, although I'm convinced I only need the group:
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
# compat Use compatibility setup
# nisplus Use NIS+ (NIS version 3)
# nis Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# db Use the /var/db databases
# [NOTFOUND=return] Stop searching if not found so far
#
# For more information, please read the nsswitch.conf.5 manual page.
#
# passwd: files nis
# shadow: files nis
# group: files nis
passwd: compat mysql
shadow: compat mysql
group: compat mysql
hosts: files dns
networks: files dns
services: files
protocols: files
rpc: files
ethers: files
netmasks: files
netgroup: files
publickey: files
bootparams: files
automount: files nis
aliases: files
Sorry for the mistakes in the previous post! :-(
As you might have noticed, I was not using the root user when doing the ltrace, so the output doesn't matter.
Here is the interesting output for the getent group
---------------------------------------------------
apolo:~ # ltrace getent group
__libc_start_main(0x0804b140, 2, 0xbffff664, 0x0804b2c0, 0x0804b320 <unfinished ...>
setlocale(6, "") = "LC_CTYPE=en_US;LC_NUMERIC=C;LC_T"...
textdomain("libc") = "libc"
__dcgettext("libc", "getent - get entries from admini"..., 5) = "getent - get entries from admini"...
__dcgettext("libc", "Supported databases:", 5) = "Supported databases:"
strlen("getent - get entries from admini"...) = 50
strlen("Supported databases:") = 20
strlen("ahosts") = 6
strlen("aliases") = 7
strlen("ethers") = 6
strlen("group") = 5
strlen("hosts") = 5
strlen("netgroup") = 8
strlen("networks") = 8
strlen("passwd") = 6
strlen("protocols") = 9
strlen("rpc") = 3
strlen("services") = 8
strlen("shadow") = 6
malloc(162) = 0x0804d8e0
__stpcpy(0x0804d8e0, 0x0804b740, 5, 0x0804d8e0, 0x0804b594) = 0x0804d912
__stpcpy(0x0804d913, 0x0804b594, 5, 0x0804d8e0, 0x0804b594) = 0x0804d927
strlen("ahosts") = 6
__mempcpy(0x0804d928, 0x0804b557, 6, 0x0804d8e0, 0x0804b594) = 0x0804d92e
strlen("aliases") = 7
__mempcpy(0x0804d92f, 0x0804b55e, 7, 0x0804d8e0, 0x0804b594) = 0x0804d936
strlen("ethers") = 6
__mempcpy(0x0804d937, 0x0804b4b1, 6, 0x0804d8e0, 0x0804b594) = 0x0804d93d
strlen("group") = 5
__mempcpy(0x0804d93e, 0x0804b504, 5, 0x0804d8e0, 0x0804b594) = 0x0804d943
strlen("hosts") = 5
__mempcpy(0x0804d944, 0x0804b558, 5, 0x0804d8e0, 0x0804b594) = 0x0804d949
strlen("netgroup") = 8
__mempcpy(0x0804d94a, 0x0804b501, 8, 0x0804d8e0, 0x0804b594) = 0x0804d952
strlen("networks") = 8
__mempcpy(0x0804d953, 0x0804b566, 8, 0x0804d8e0, 0x0804b594) = 0x0804d95b
strlen("passwd") = 6
__mempcpy(0x0804d95c, 0x0804b56f, 6, 0x0804d8e0, 0x0804b594) = 0x0804d962
strlen("protocols") = 9
__mempcpy(0x0804d963, 0x0804b576, 9, 0x0804d8e0, 0x0804b594) = 0x0804d96c
strlen("rpc") = 3
__mempcpy(0x0804d96d, 0x0804b580, 3, 0x0804d8e0, 0x0804b594) = 0x0804d970
strlen("services") = 8
__mempcpy(0x0804d971, 0x0804b584, 8, 0x0804d8e0, 0x0804b594) = 0x0804d979
strlen("shadow") = 6
__mempcpy(0x0804d97a, 0x0804b58d, 6, 0x0804d8e0, 0x0804b594) = 0x0804d980
argp_parse(0x0804c7a4, 2, 0xbffff664, 0, 0xbffff608) = 0
strcmp("group", "group") = 0
setgrent(0x4002c54c, 3, 0xbffff7da, 1, 0xbffff618) = 0x40153360
getgrent(0x4002c54c, 3, 0xbffff7da, 1, 0xbffff618) = 0x4015421c
printf("%s:%s:%ld:", "root", "x", 0) = 9
__overflow(0x4014fd80, 10, 0x0804eed5, 0, 0xbffff618root❌0:
) = 10
getgrent(0x4014fd80, 10, 0x0804eed5, 0, 0xbffff618) = 0x4015421c
printf("%s:%s:%ld:", "bin", "x", 1) = 8
fputs_unlocked(0x0804eed8, 0x4014fd80, 0x0804eed4, 1, 0xbffff618) = 1
__overflow(0x4014fd80, 10, 0x0804eed4, 1, 0xbffff618bin❌1:daemon
) = 10
...
getgrent(0x4014fd80, 10, 0x0804eed8, 71, 0xbffff618) = 0x4015421c
printf("%s:%s:%ld:", "nobody", "x", 65533) = 15
fputs_unlocked(0x0804eedf, 0x4014fd80, 0x0804eed7, 65533, 0xbffff618) = 1
__overflow(0x4014fd80, 10, 0x0804eed7, 65533, 0xbffff618nobody❌65533:nobody
) = 10
getgrent(0x4014fd80, 10, 0x0804eed7, 65533, 0xbffff618) = 0x4015421c
printf("%s:%s:%ld:", "nogroup", "x", 65534) = 16
fputs_unlocked(0x0804eee0, 0x4014fd80, 0x0804eed8, 65534, 0xbffff618) = 1
__overflow(0x4014fd80, 10, 0x0804eed8, 65534, 0xbffff618nogroup❌65534:nobody
) = 10
getgrent(0x4014fd80, 10, 0x0804eed8, 65534, 0xbffff618) = 0x4015421c
printf("%s:%s:%ld:", "users", "x", 100) = 12
__overflow(0x4014fd80, 10, 0x0804eed6, 100, 0xbffff618users❌100:
) = 10
getgrent(0x4014fd80, 10, 0x0804eed6, 100, 0xbffff618) = 0x4015421c
printf("%s:%s:%ld:", "vscan", "x", 101) = 12
__overflow(0x4014fd80, 10, 0x0804eed6, 101, 0xbffff618vscan❌101:
) = 10
getgrent(0x4014fd80, 10, 0x0804eed6, 101, 0xbffff618) = 0x4015421c
printf("%s:%s:%ld:", "cd", "x", 50000) = 11
fputs_unlocked(0x0804eee4, 0x4014fd80, 0x0804eed3, 50000, 0xbffff618) = 1
__overflow(0x4014fd80, 44, 0x0804eed3, 50000, 0xbffff618) = 44
fputs_unlocked(0x0804eee9, 0x4014fd80, 0x0804eed3, 50000, 0xbffff618) = 1
__overflow(0x4014fd80, 10, 0x0804eed3, 50000, 0xbffff618cd❌50000:u230039,u230046
) = 10
getgrent(0x4014fd80, 10, 0x0804eed3, 50000, 0xbffff618) = 0x4015421c
printf("%s:%s:%ld:", "cc", "x", 50001) = 11
fputs_unlocked(0x0804eee4, 0x4014fd80, 0x0804eed3, 50001, 0xbffff618) = 1
__overflow(0x4014fd80, 44, 0x0804eed3, 50001, 0xbffff618) = 44
fputs_unlocked(0x0804eee9, 0x4014fd80, 0x0804eed3, 50001, 0xbffff618) = 1
__overflow(0x4014fd80, 10, 0x0804eed3, 50001, 0xbffff618cc❌50001:u230034,u230046
) = 10
getgrent(0x4014fd80, 10, 0x0804eed3, 50001, 0xbffff618) = 0x4015421c
printf("%s:%s:%ld:", "cp", "x", 50002) = 11
fputs_unlocked(0x0804eee4, 0x4014fd80, 0x0804eed3, 50002, 0xbffff618) = 1
__overflow(0x4014fd80, 44, 0x0804eed3, 50002, 0xbffff618) = 44
fputs_unlocked(0x0804eee9, 0x4014fd80, 0x0804eed3, 50002, 0xbffff618) = 1
__overflow(0x4014fd80, 10, 0x0804eed3, 50002, 0xbffff618cp❌50002:u230028,u230046
) = 10
getgrent(0x4014fd80, 10, 0x0804eed3, 50002, 0xbffff618) = 0x4015421c
printf("%s:%s:%ld:", "sec", "x", 50003) = 19
fputs_unlocked(0x0804eeec, 0x4014fd80, 0x0804eedb, 50003, 0xbffff618) = 1
__overflow(0x4014fd80, 44, 0x0804eedb, 50003, 0xbffff618) = 44
fputs_unlocked(0x0804eef1, 0x4014fd80, 0x0804eedb, 50003, 0xbffff618) = 1
__overflow(0x4014fd80, 10, 0x0804eedb, 50003, 0xbffff618sec❌50003:u230039,u230077
) = 10
getgrent(0x4014fd80, 10, 0x0804eedb, 50003, 0xbffff618) = 0x4015421c
printf("%s:%s:%ld:", "sect", "x", 50009) = 21
fputs_unlocked(0x0804eee8, 0x4014fd80, 0x0804eedd, 50009, 0xbffff618) = 1
__overflow(0x4014fd80, 10, 0x0804eedd, 50009, 0xbffff618sect❌50009:u230046
) = 10
getgrent(0x4014fd80, 10, 0x0804eedd, 50009, 0xbffff618) = 0x4015421c
printf("%s:%s:%ld:", "it", "x", 50030) = 20
fputs_unlocked(0x0804eeec, 0x4014fd80, 0x0804eedc, 50030, 0xbffff618) = 1
__overflow(0x4014fd80, 44, 0x0804eedc, 50030, 0xbffff618) = 44
fputs_unlocked(0x0804eef1, 0x4014fd80, 0x0804eedc, 50030, 0xbffff618) = 1
__overflow(0x4014fd80, 10, 0x0804eedc, 50030, 0xbffff618it❌50030:u230077,u230005
) = 10
getgrent(0x4014fd80, 10, 0x0804eedc, 50030, 0xbffff618) = 0x4015421c
printf("%s:%s:%ld:", "gre", "x", 50050) = 12
__overflow(0x4014fd80, 10, 0x0804eed4, 50050, 0xbffff618gre❌50050:
) = 10
getgrent(0x4014fd80, 10, 0x0804eed4, 50050, 0xbffff618) = 0x4015421c
printf("%s:%s:%ld:", "all", "x", 60000) = 12
fputs_unlocked(0x0804eef4, 0x4014fd80, 0x0804eed4, 60000, 0xbffff618) = 1
__overflow(0x4014fd80, 44, 0x0804eed4, 60000, 0xbffff618) = 44
fputs_unlocked(0x0804eef9, 0x4014fd80, 0x0804eed4, 60000, 0xbffff618) = 1
__overflow(0x4014fd80, 44, 0x0804eed4, 60000, 0xbffff618) = 44
fputs_unlocked(0x0804eefe, 0x4014fd80, 0x0804eed4, 60000, 0xbffff618) = 1
__overflow(0x4014fd80, 44, 0x0804eed4, 60000, 0xbffff618) = 44
fputs_unlocked(0x0804ef03, 0x4014fd80, 0x0804eed4, 60000, 0xbffff618) = 1
__overflow(0x4014fd80, 44, 0x0804eed4, 60000, 0xbffff618) = 44
fputs_unlocked(0x0804ef09, 0x4014fd80, 0x0804eed4, 60000, 0xbffff618) = 1
__overflow(0x4014fd80, 44, 0x0804eed4, 60000, 0xbffff618) = 44
fputs_unlocked(0x0804ef0f, 0x4014fd80, 0x0804eed4, 60000, 0xbffff618) = 1
__overflow(0x4014fd80, 10, 0x0804eed4, 60000, 0xbffff618all❌60000:u230028,u230034,u230039,u230046,u230077,u230005
) = 10
getgrent(0x4014fd80, 10, 0x0804eed4, 60000, 0xbffff618) = 0
endgrent() = <void>
+++ exited (status 0) +++
apolo:~ #
---------------------------------------------------
and here of the compat group
---------------------------------------------------
apolo:~ # ltrace getent group root
__libc_start_main(0x0804b140, 3, 0xbffff664, 0x0804b2c0, 0x0804b320 <unfinished ...>
setlocale(6, "") = "LC_CTYPE=en_US;LC_NUMERIC=C;LC_T"...
textdomain("libc") = "libc"
__dcgettext("libc", "getent - get entries from admini"..., 5) = "getent - get entries from admini"...
__dcgettext("libc", "Supported databases:", 5) = "Supported databases:"
strlen("getent - get entries from admini"...) = 50
strlen("Supported databases:") = 20
strlen("ahosts") = 6
strlen("aliases") = 7
strlen("ethers") = 6
strlen("group") = 5
strlen("hosts") = 5
strlen("netgroup") = 8
strlen("networks") = 8
strlen("passwd") = 6
strlen("protocols") = 9
strlen("rpc") = 3
strlen("services") = 8
strlen("shadow") = 6
malloc(162) = 0x0804d8e0
__stpcpy(0x0804d8e0, 0x0804b740, 5, 0x0804d8e0, 0x0804b594) = 0x0804d912
__stpcpy(0x0804d913, 0x0804b594, 5, 0x0804d8e0, 0x0804b594) = 0x0804d927
strlen("ahosts") = 6
__mempcpy(0x0804d928, 0x0804b557, 6, 0x0804d8e0, 0x0804b594) = 0x0804d92e
strlen("aliases") = 7
__mempcpy(0x0804d92f, 0x0804b55e, 7, 0x0804d8e0, 0x0804b594) = 0x0804d936
strlen("ethers") = 6
__mempcpy(0x0804d937, 0x0804b4b1, 6, 0x0804d8e0, 0x0804b594) = 0x0804d93d
strlen("group") = 5
__mempcpy(0x0804d93e, 0x0804b504, 5, 0x0804d8e0, 0x0804b594) = 0x0804d943
strlen("hosts") = 5
__mempcpy(0x0804d944, 0x0804b558, 5, 0x0804d8e0, 0x0804b594) = 0x0804d949
strlen("netgroup") = 8
__mempcpy(0x0804d94a, 0x0804b501, 8, 0x0804d8e0, 0x0804b594) = 0x0804d952
strlen("networks") = 8
__mempcpy(0x0804d953, 0x0804b566, 8, 0x0804d8e0, 0x0804b594) = 0x0804d95b
strlen("passwd") = 6
__mempcpy(0x0804d95c, 0x0804b56f, 6, 0x0804d8e0, 0x0804b594) = 0x0804d962
strlen("protocols") = 9
__mempcpy(0x0804d963, 0x0804b576, 9, 0x0804d8e0, 0x0804b594) = 0x0804d96c
strlen("rpc") = 3
__mempcpy(0x0804d96d, 0x0804b580, 3, 0x0804d8e0, 0x0804b594) = 0x0804d970
strlen("services") = 8
__mempcpy(0x0804d971, 0x0804b584, 8, 0x0804d8e0, 0x0804b594) = 0x0804d979
strlen("shadow") = 6
__mempcpy(0x0804d97a, 0x0804b58d, 6, 0x0804d8e0, 0x0804b594) = 0x0804d980
argp_parse(0x0804c7a4, 3, 0xbffff664, 0, 0xbffff608) = 0
strcmp("group", "group") = 0
__ctype_b_loc(0x4002c54c, 3, 0xbffff7d5, 1, 0xbffff618) = 0x40155938
getgrnam("root") = 0x40154274
printf("%s:%s:%ld:", "root", "x", 0) = 9
__overflow(0x4014fd80, 10, 0x0804d991, 0, 0x40155938root❌0:
) = 10
+++ exited (status 0) +++
apolo:~ #
---------------------------------------------------
and of the mysql group by name
---------------------------------------------------
apolo:~ # ltrace getent group cd
__libc_start_main(0x0804b140, 3, 0xbffff664, 0x0804b2c0, 0x0804b320 <unfinished ...>
setlocale(6, "") = "LC_CTYPE=en_US;LC_NUMERIC=C;LC_T"...
textdomain("libc") = "libc"
__dcgettext("libc", "getent - get entries from admini"..., 5) = "getent - get entries from admini"...
__dcgettext("libc", "Supported databases:", 5) = "Supported databases:"
strlen("getent - get entries from admini"...) = 50
strlen("Supported databases:") = 20
strlen("ahosts") = 6
strlen("aliases") = 7
strlen("ethers") = 6
strlen("group") = 5
strlen("hosts") = 5
strlen("netgroup") = 8
strlen("networks") = 8
strlen("passwd") = 6
strlen("protocols") = 9
strlen("rpc") = 3
strlen("services") = 8
strlen("shadow") = 6
malloc(162) = 0x0804d8e0
__stpcpy(0x0804d8e0, 0x0804b740, 5, 0x0804d8e0, 0x0804b594) = 0x0804d912
__stpcpy(0x0804d913, 0x0804b594, 5, 0x0804d8e0, 0x0804b594) = 0x0804d927
strlen("ahosts") = 6
__mempcpy(0x0804d928, 0x0804b557, 6, 0x0804d8e0, 0x0804b594) = 0x0804d92e
strlen("aliases") = 7
__mempcpy(0x0804d92f, 0x0804b55e, 7, 0x0804d8e0, 0x0804b594) = 0x0804d936
strlen("ethers") = 6
__mempcpy(0x0804d937, 0x0804b4b1, 6, 0x0804d8e0, 0x0804b594) = 0x0804d93d
strlen("group") = 5
__mempcpy(0x0804d93e, 0x0804b504, 5, 0x0804d8e0, 0x0804b594) = 0x0804d943
strlen("hosts") = 5
__mempcpy(0x0804d944, 0x0804b558, 5, 0x0804d8e0, 0x0804b594) = 0x0804d949
strlen("netgroup") = 8
__mempcpy(0x0804d94a, 0x0804b501, 8, 0x0804d8e0, 0x0804b594) = 0x0804d952
strlen("networks") = 8
__mempcpy(0x0804d953, 0x0804b566, 8, 0x0804d8e0, 0x0804b594) = 0x0804d95b
strlen("passwd") = 6
__mempcpy(0x0804d95c, 0x0804b56f, 6, 0x0804d8e0, 0x0804b594) = 0x0804d962
strlen("protocols") = 9
__mempcpy(0x0804d963, 0x0804b576, 9, 0x0804d8e0, 0x0804b594) = 0x0804d96c
strlen("rpc") = 3
__mempcpy(0x0804d96d, 0x0804b580, 3, 0x0804d8e0, 0x0804b594) = 0x0804d970
strlen("services") = 8
__mempcpy(0x0804d971, 0x0804b584, 8, 0x0804d8e0, 0x0804b594) = 0x0804d979
strlen("shadow") = 6
__mempcpy(0x0804d97a, 0x0804b58d, 6, 0x0804d8e0, 0x0804b594) = 0x0804d980
argp_parse(0x0804c7a4, 3, 0xbffff664, 0, 0xbffff608) = 0
strcmp("group", "group") = 0
__ctype_b_loc(0x4002c54c, 3, 0xbffff7d7, 1, 0xbffff618) = 0x40155938
getgrnam("cd") = NULL
+++ exited (status 2) +++
apolo:~ #
---------------------------------------------------
and by grid
---------------------------------------------------
apolo:~ # ltrace getent group 50000
__libc_start_main(0x0804b140, 3, 0xbffff664, 0x0804b2c0, 0x0804b320 <unfinished ...>
setlocale(6, "") = "LC_CTYPE=en_US;LC_NUMERIC=C;LC_T"...
textdomain("libc") = "libc"
__dcgettext("libc", "getent - get entries from admini"..., 5) = "getent - get entries from admini"...
__dcgettext("libc", "Supported databases:", 5) = "Supported databases:"
strlen("getent - get entries from admini"...) = 50
strlen("Supported databases:") = 20
strlen("ahosts") = 6
strlen("aliases") = 7
strlen("ethers") = 6
strlen("group") = 5
strlen("hosts") = 5
strlen("netgroup") = 8
strlen("networks") = 8
strlen("passwd") = 6
strlen("protocols") = 9
strlen("rpc") = 3
strlen("services") = 8
strlen("shadow") = 6
malloc(162) = 0x0804d8e0
__stpcpy(0x0804d8e0, 0x0804b740, 5, 0x0804d8e0, 0x0804b594) = 0x0804d912
__stpcpy(0x0804d913, 0x0804b594, 5, 0x0804d8e0, 0x0804b594) = 0x0804d927
strlen("ahosts") = 6
__mempcpy(0x0804d928, 0x0804b557, 6, 0x0804d8e0, 0x0804b594) = 0x0804d92e
strlen("aliases") = 7
__mempcpy(0x0804d92f, 0x0804b55e, 7, 0x0804d8e0, 0x0804b594) = 0x0804d936
strlen("ethers") = 6
__mempcpy(0x0804d937, 0x0804b4b1, 6, 0x0804d8e0, 0x0804b594) = 0x0804d93d
strlen("group") = 5
__mempcpy(0x0804d93e, 0x0804b504, 5, 0x0804d8e0, 0x0804b594) = 0x0804d943
strlen("hosts") = 5
__mempcpy(0x0804d944, 0x0804b558, 5, 0x0804d8e0, 0x0804b594) = 0x0804d949
strlen("netgroup") = 8
__mempcpy(0x0804d94a, 0x0804b501, 8, 0x0804d8e0, 0x0804b594) = 0x0804d952
strlen("networks") = 8
__mempcpy(0x0804d953, 0x0804b566, 8, 0x0804d8e0, 0x0804b594) = 0x0804d95b
strlen("passwd") = 6
__mempcpy(0x0804d95c, 0x0804b56f, 6, 0x0804d8e0, 0x0804b594) = 0x0804d962
strlen("protocols") = 9
__mempcpy(0x0804d963, 0x0804b576, 9, 0x0804d8e0, 0x0804b594) = 0x0804d96c
strlen("rpc") = 3
__mempcpy(0x0804d96d, 0x0804b580, 3, 0x0804d8e0, 0x0804b594) = 0x0804d970
strlen("services") = 8
__mempcpy(0x0804d971, 0x0804b584, 8, 0x0804d8e0, 0x0804b594) = 0x0804d979
strlen("shadow") = 6
__mempcpy(0x0804d97a, 0x0804b58d, 6, 0x0804d8e0, 0x0804b594) = 0x0804d980
argp_parse(0x0804c7a4, 3, 0xbffff664, 0, 0xbffff608) = 0
strcmp("group", "group") = 0
__ctype_b_loc(0x4002c54c, 3, 0xbffff7d4, 1, 0xbffff618) = 0x40155938
__strtoul_internal(0xbffff7da, 0xbffff5d8, 10, 0, 0x40155938) = 50000
getgrgid(50000, 0xbffff5d8, 10, 0, 0x40155938) = 0
+++ exited (status 2) +++
apolo:~ #
---------------------------------------------------
Thank you.
Jorge Manuel B. S. Vicetto
Can you try libnss 1.1 on suse, just in case there's a problem with 1.2?
Also, what's your glibc version on both boxes (ls -l /lib/libc-*)? Might be good to know gcc version and mysql versions as well.
An 'ltrace -S getent group cd' may also prove useful ..tho you may want to sling that into an email (cinergi@users.sourceforge.net).
Thank you.
I'm sorry for the long posts, so I'll send you an e-mail.
Jorge.
Hi!
For anyone interested in this problem, the solution was simple: disable nscd! I was convinced that I had done it, but appearantly was lost in the way! :-)
Thanks Ben for the help.
Jorge.
Turns out a restart of nscd is all that's required. libnss-mysql should work fine with nscd enabled. In fact, I recommend using nscd in general.