Bug 500 - smbpasswd and ldap
Summary: smbpasswd and ldap
Status: RESOLVED INVALID
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Domain Control (show other bugs)
Version: 3.0.0preX
Hardware: All Linux
: P4 normal
Target Milestone: 3.0.1
Assignee: Samba Bugzilla Account
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-24 01:41 UTC by Dudochkin Victor
Modified: 2005-11-14 09:26 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 Dudochkin Victor 2003-09-24 01:41:33 UTC
I have: Samba3.0rc4 configured to use ldapsam

When I type: smbpasswd -a ntadmin -D5
--------------------------------------------

Netbios name list:-
my_netbios_names[0]="ORLEAN"
Trying to load: ldapsam:ldap://127.0.0.1
Attempting to register passdb backend ldapsam
Successfully added passdb backend 'ldapsam'
Attempting to register passdb backend ldapsam_compat
Successfully added passdb backend 'ldapsam_compat'
Attempting to register passdb backend smbpasswd
Successfully added passdb backend 'smbpasswd'
Attempting to register passdb backend tdbsam
Successfully added passdb backend 'tdbsam'
Attempting to register passdb backend guest
Successfully added passdb backend 'guest'
Attempting to find an passdb backend to match ldapsam:ldap://127.0.0.1 (ldapsam)
Found pdb backend ldapsam
Searching for:[(&(objectClass=sambaDomain)(sambaDomainName=NEWALMAKOR))]
smbldap_search_suffix: searching
for:[(&(objectClass=sambaDomain)(sambaDomainName=NEWALMAKOR))]
smbldap_open_connection: connection opened
ldap_connect_system: succesful connection to the LDAP server
The LDAP server is succesful connected
pdb backend ldapsam:ldap://127.0.0.1 has a valid init
Attempting to find an passdb backend to match guest (guest)
Found pdb backend guest
pdb backend guest has a valid init
smbldap_search_suffix: searching
for:[(&(uid=ntadmin1)(objectclass=sambaSamAccount))]
ldapsam_getsampwnam: Unable to locate user [ntadmin1] count=0
Finding user ntadmin1
Trying _Get_Pwnam(), username as lowercase is ntadmin1
Trying _Get_Pwnam(), username as uppercase is NTADMIN1
Checking combinations of 0 uppercase letters in ntadmin1
Get_Pwnam_internals didn't find user [ntadmin1]!
Failed initialise SAM_ACCOUNT for user ntadmin1.
Failed to modify password entry for user ntadmin1

--------------------------------------------
This output look like smbpasswd trying to find existing sambaSamAccount in ldap
directory whith valid sambaSID field. But I think, the option "a" is a "add
user", and it must create acoount. It works when in ldap I have a record for
that user and valid sambaSID fild value.
How to generate sambaSID?

And I have error "Bad filter", then I set "ldap filter" (how described in
documentation!) to "(&(uid=%u)(objectclass=sambaSamAccount))"

PS:Sorry about bad English.
Comment 1 Gerald (Jerry) Carter (dead mail address) 2003-10-01 13:15:50 UTC
the user you are adding has to have a UNIX 
identify first.  This is no different that 2.2.
The behavior you are seeing is by design.
Comment 2 Gerald (Jerry) Carter (dead mail address) 2005-02-07 09:05:17 UTC
originally reported against one of the 3.0.0rc[1-4] releases.
Cleaning up non-production versions.
Comment 3 Gerald (Jerry) Carter (dead mail address) 2005-11-14 09:26:28 UTC
database cleanup