[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Nss-mysql-users] RedHat 9 not loading libnss-mysql
From: |
Jim Shewmaker |
Subject: |
RE: [Nss-mysql-users] RedHat 9 not loading libnss-mysql |
Date: |
Mon, 7 Jun 2004 11:54:36 -0700 |
-----Original Message-----
From: Jason Clifford [mailto:address@hidden
Sent: Monday, June 07, 2004 11:34 AM
To: Jim Shewmaker
Subject: Re: [Nss-mysql-users] RedHat 9 not loading libnss-mysql
Have you verified that mysql is running and that the user you've
configured nss_mysql to run as is able to query the database as required?
-- Yes, mysqld is running happily serving many databases for a variety of
websites hosted on the server.
-- Yes, the user/pass/db I am using was what I also use for proftpd's
mod_sql to authenticate. I've modified the queries appropriately to match
my table definitions.
I think you should also list the above as "files mysql" as you will want
those entries listed in /etc/passwd seen first - particularly so that you
avoid potential issues for mysql.
-- Yeah, I just tried it first to see if I could cause an error message or
something to give me a clue.
When you are not running nscd are things working?
--Yes, "normal" things are working fine without nscd, my ultimate goal is to
let these MySQL based users be allowed to FTP over SSH or SFTP, but I can't
even get "id testusername" to work on the system.
Thanks for the tips/comments, but it since the strace doesn't show anything
about mysql, I'm wondering if there is something else I need to do to nscd?
I have the feeling I'm missing something embarissingly obvious, like would
not having a getgrpid statement keep strace from showing that it ever loaded
libnss-mysql? Is the /etc/libnss-mysql-root.cfg literally supposed to me my
sql root account and password?
/etc/libnss-mysql-root.cfg:
[server]
username proftpd_admin
password proftpd_pass
/etc/libnss-mysql.cfg:
[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
getpwnam SELECT username,uid,gid,homedir,shell FROM users WHERE
username='%s' LIMIT 1
getpwuid SELECT username,uid,gid,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
getspnam SELECT username,password FROM users WHERE username='%s' LIMIT 1
#getpwent SELECT username,'x',uid,gid,gecos,homedir,shell FROM users
getpwent SELECT username,,uid,gid,homedir,shell FROM users
getspent SELECT username,password 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 client_accounts
username proftpd_admin
password proftpd_pass
socket /var/lib/mysql/mysql.sock
#port 3306
timeout 3
compress 0
#initcmd sql-statement-here