Bug 3066 - Impossible to create new users with mysql/pgsql passdb backend (due to fix to bug#1957)
Summary: Impossible to create new users with mysql/pgsql passdb backend (due to fix to...
Status: RESOLVED DUPLICATE of bug 2531
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: User/Group Accounts (show other bugs)
Version: 3.0.20
Hardware: All All
: P3 major
Target Milestone: none
Assignee: Jelmer Vernooij
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-06 20:33 UTC by Uli M
Modified: 2005-09-19 05:59 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uli M 2005-09-06 20:33:07 UTC
In Bug #1957 it was complained that SQL Updates always update all columns and
that behaviour was subsequently changed. Unfortunately, now SQL Inserts don't
get all columns either(even username and sids are missing).
Here's what I did:

In pdb_sql.c you'll find something like this for each field:

if (IS_SAM_CHANGED(newpwd, PDB_ACCTCTRL)) update_the_field

which I changed in VIM with :%s/if (IS_SAM/if (!query->update||IS_SAM/g to

if (!query->update||IS_SAM_CHANGED(newpwd, PDB_ACCTCTRL)) {

This little fix works for me, now all fields are set for inserts and it's as
efficient for updates as it was.

One other thing: The sql dump for mysql is missing the new logon_hours field and
I didn't see a dump for pgsql at all.

Greetings,

Uli
Comment 1 Uli M 2005-09-19 05:59:49 UTC

*** This bug has been marked as a duplicate of 2531 ***