[Samba] Group Mapping in MySQL backend
bjoern at solution.de
Wed Feb 4 19:49:57 GMT 2004
Am Mittwoch, 4. Februar 2004 19:48 schrieben Sie:
> Bjoern Scheuermann wrote:
> >Hi Jelmer,
> >>>I also consider a little patch for being able to use one single table
> >>> for nss_mysql's and samba's data. More precise, I don't want smbpasswd
> >>> -a or a samba domain join to fail if a row with the given UID/username
> >>> already exists, but rather to fill the "samba-columns", i.e. doing an
> >>> UPDATE instead of an INSERT, if the ID already exists.
> >>That's a one-liner. INSERT should be replaced with REPLACE in that
> >ah - no. I don't want to lose the values in all the non-samba columns. :-)
> You won't. pdb_mysql only INSERTs (and if you replace INSERT with
> REPLACE), only REPLACE's the fields Samba knows about.
MySQL fills all the fields not present in a REPLACE statement with the default
value. REPLACE is equivalent with first a DELETE, and afterwards a re-INSERT,
so all fields which are not known by Samba will get lost.
More information about the samba