Bug 4438 - net sam provision fails when guest user's posix account has no shell set in /etc/passwd
Summary: net sam provision fails when guest user's posix account has no shell set in /...
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: net utility (show other bugs)
Version: 3.0.24
Hardware: All Linux
: P3 normal
Target Milestone: none
Assignee: Simo Sorce
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-08 15:05 UTC by rtcg
Modified: 2007-03-10 09:12 UTC (History)
1 user (show)

See Also:


Attachments
fix for 4438/4440 (1.58 KB, patch)
2007-03-09 09:28 UTC, Simo Sorce
no flags Details
correct patch to fix 4438/4440 (1.92 KB, patch)
2007-03-09 10:18 UTC, Simo Sorce
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description rtcg 2007-03-08 15:05:57 UTC
'net sam provision' fails if the posix account for the user specified in "guest account = " does not contain an entry for shell
host# net sam provision
  <snip>
  Adding the Guest user.
  Failed to add Guest user to ldap directory
  Checking Guest's group.
  found!

ldap log:
  30632:Mar  8 14:14:40 server slapd[25639]: conn=23 op=2 ADD dn="uid=nobody,ou=users,dc=example,dc=org"
  30633-Mar  8 14:14:40 server slapd[25639]: conn=23 op=2 RESULT tag=105 err=21 text=loginShell: value #0 invalid per syntax

Possible location of bug - Samba 3.0.24:net_sam.c  /  Line 1125

 smbldap_set_mod(&mods, LDAP_MOD_ADD, "loginShell", pwd->pw_shell);

offending /etc/passwd entry:
 nobody:x:99:99:nobody:/:


Current workaround:  Assign a valid shell to the guest user's posix account
Comment 1 Simo Sorce 2007-03-09 09:28:44 UTC
Created attachment 2320 [details]
fix for 4438/4440

Can you test with this patch, should solve 4438 and 4440 completely.
Comment 2 Simo Sorce 2007-03-09 10:18:14 UTC
Created attachment 2321 [details]
correct patch to fix 4438/4440

Uh oh, _always_ compile first :-)
Comment 3 Simo Sorce 2007-03-10 09:12:31 UTC
Richard confirmed the bug is fixed
Committed patch to 3_0 and 3_0_25