i'm experimenting a bit with the mysql backend. i'm integrating both nss
(throught libnss-mysql) lookups and samba users, in the same db, and (!) in the
same table. the only fields shared among samba and nss are username, uid and gid.
here comes the problems:
i normally add a posix user in the db, setting username, uid, gid and the other
[problem 1] then, if i try a smbpasswd -a <username>, when smbpasswd checks for
the existance of the user in the db, it segfaults (immediately after the select
query, as i can see from mysql.log)
[problem 2] pdbedit -a -u <username> seems to work perfectly, but when i check
in the db, it added a second record regarding the user, instead of updating the
existing one with the posix infos, so that nss obviusly get confused.
i hope i have been clear enough,
PS: i hope i've been right to assign this directly to Jelmer, too.
Can you get a backtrace of problem 1 ? Also, what exactly is the configuration
you're using (smb.conf and MySQL table layout) ?
Assigning to me directly is ok, btw. Saves us some work :-)
well, trying to backtrace problem 1, i haven't been able to reproduce the
segfault. probably there was something weird in the db.
now, smbpasswd -a acts exactly as pdbedit in problem 2. i'm attaching a strace
of "smbpasswd -a foo", with some other info about the queries and the table
structure. the relevant part in smb.conf is the default one:
passdb backend = mysql:itc
itc:mysql user = system
itc:mysql password = XXX
itc:mysql database = system
Created attachment 221 [details]
strace of smbpasswd -a foo
Created attachment 222 [details]
some relevant mysql queries
Try creating a unique key on the uid field.
i've an incumbent deadline so i'll test it as soon as i can, but don't know how
thanks for your patience, meanwhile i'll try to test it also on 3.0.1-preX
no response. closing