Bug 786 - error in wb_client.c
Summary: error in wb_client.c
Status: RESOLVED WONTFIX
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: winbind (show other bugs)
Version: 3.0.0
Hardware: Other FreeBSD
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-17 12:11 UTC by Aaron Collins
Modified: 2003-11-21 21:48 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Collins 2003-11-17 12:11:02 UTC
I've noticed that in FreeBSD 5.1 there seems to be an error in winbind when it trys to create the local account from the AD.  By default it doesn't pass the user's group to the create_user function.  I noticed in the code of the wb_client.c file it is hardcoded as 'fstrcpy( request.data.acct_mgt.groupname, "" );'  

Below is a -d4 on the Winbind process

[47507]: request interface version
[47507]: request location of privileged pipe
[47507]: ping
[47507]: pam auth crap domain: EXAMPLE user: aaronc
Using cleartext machine password
cred_create
cred_create
cred_assert
[47507]: create_user: user=>(aaronc), group=>()


If you notice it doesn't pass a group parameter.  After I noticed this I hardcoded my group into the field in the wb_client.c for testing, and I noticed I got a different error

[47507]: request interface version
[47507]: request location of privileged pipe
[47507]: ping
[47507]: pam auth crap domain: EXAMPLE user: aaronc
Using cleartext machine password
cred_create
cred_create
cred_assert
[47507]: create_user: user=>(aaronc), group=>(techs)
winbindd_create_user: Cannot validate gid for group (techs)

I believe this is an error in the winbind client end, but I'm not entirly sure how to fix it.
Comment 1 Aaron Collins 2003-11-17 13:04:42 UTC
I believe the second error I get comes from the fact that the nsswitch in freebsd 5.1 doesn't work right with samba 3.0.0 yet
winbindd_create_user: Cannot validate gid for group (techs)
The code calls the getgrnam and doesn't recieve it.  But that sill doesn't explain why wc_client.c passes a null group param for create_user
Comment 2 Gerald (Jerry) Carter (dead mail address) 2003-11-18 06:58:44 UTC
You shouldn't be creating local accounts in this 
case anyways.  The correct configuration is to use 
winbindd NSS support.
Comment 3 Gerald (Jerry) Carter (dead mail address) 2003-11-21 21:48:55 UTC
The correct thing to do is to fix bug 797.