[K12OSN] Perplexing Samba LDAP issue

Rob Owens rowens at ptd.net
Fri Mar 20 15:28:00 UTC 2009


On Thu, Mar 19, 2009 at 08:01:34PM -0500, R. Scott Belford wrote:
> On Thu, Mar 19, 2009 at 11:12 AM, Rob Owens <rowens at ptd.net> wrote:
> > On Thu, Mar 19, 2009 at 10:46:57AM -0500, R. Scott Belford wrote:
> >> Aloha
> >>
> >> I am finding myself a bit stumped at the moment by the following error
> >> when adding a user to a Centos 4 based samba/ldap/nfs server.
> >>
> >> [root at localhost ~]# smbldap-useradd alohak12osn
> >> Error: context csn exists before context prefix does at
> >> /usr/sbin//smbldap_tools.pm line 1187.
> >>
> >> Things had been fine until a power outage took down the server.  I had
> >> to do DB recovery to restore LDAP to functionality, but it now seems
> >> that something else is corrupted.  I've done some searching without
> >> luck, yet.  I am hoping that one of you have seen or been stumped by
> >> this before.  Any suggestions would be most appreciated.
> >>
> > Just a wild guess:
> >
> > I googled csn and it looks like it's a timestamp of sorts.  Is your system time/date correct?
> >
> > The other thing I'd do is check ldap.conf, libnss-ldap.conf, pam_ldap.conf, and nsswitch.conf against your backups to see if they got corrupted.
> >
> > What does line 1187 of smbldap_tools.pm say?  Maybe that'll give some clues.
> 
> Aloha Rob
> 
> Thanks for the reply.  I went offline for the day.  Time and date are
> correct, but, I'll start thinking along those lines.
> 
> It seems to be something UID related.  1187 is the 5th of the following 5 lines.
> 
> $nextuid = $entry->get_value($attribute);
>         my $modify =
>           $ldap->modify( "$config{sambaUnixIdPooldn}",
>             changes => [ replace => [ $attribute => $nextuid + 1 ] ] );
>         $modify->code && die "Error: ", $modify->error;
> 
Hmm, I think this is over my head.  Do you have multiple backups of the DB?  If so, maybe try restoring an older one as a test and see if you get the same
problem.  Also, just out of superstition, I'd try adding a user with a different name and see if you get the same results.  One more thing:  what if you
try specifying the UID manually when adding a user?

-Rob




More information about the K12OSN mailing list