# smbpasswd suddenly thinks it needs LDAP :-(

## Klavs

Hi guys,

I just tried to change my smbpasswd and I got this output:

smbpasswd klavs

New SMB password:

Retype new SMB password:

LDAPS option set...!

fetch_ldap_pw: no ldap secret retrieved!

ldap_connect_system: Failed to retrieve password for  from secrets.tdb

Failed to find entry for user klavs.

Failed to modify password entry for user klavs

what the hell is happening here? how did it got setup to auth via ldap?

I see no evidence of this in smb.conf or anywhere else.

I just know that I've installed openldap and pam_ldap - but that shouldn't mean that samba suddenly decides to auth via that?

Any help will be appreciated.

----------

## lx

Obvious fix recompile samba, using 

```
USE="-ldap" emerge samba
```

.

Cya lX.

----------

## Klavs

I know. but what if I wanted to be able to set it up for samba later on?

But thanks for the info.

anyways, I think I'm gonna have to do that until now  :Sad: 

----------

## flickerfly

You should be able to just comment out the LDAP lines in /etc/samba, or it may have something to do with the pasword change script.  That might have to be changed back to default, but I'm not sure what that would be or if it is even neccesary w/out LDAP.

A place to start anyway...

_JR

----------

## Klavs

The weird thing was, that there wasn't any LDAP lines in /etc/samba/smb.conf - otherwise I would have disabled them. it simply defaulted to LDAP  :Sad: 

Anyways, for now I have compiled it with USE="-LDAP".

----------

## Nightweaver

I had this problem, too ... I didn't have LDAP in either /etc/make.conf or the other one (that you aren't meant to change), and I *still* had to explicitly say 'USE="-ldap"' to install Samba.

----------

## flickerfly

[quote="Nightweaver"]I had this problem, too ... I didn't have LDAP in either /etc/make.conf or the other one (that you aren't meant to change), and I *still* had to explicitly say 'USE="-ldap"' to install Samba.[/quote]

Anybody post a bug for it yet?

----------

## flickerfly

I couldn't find a bug on this so I submitted it.  If you want to watch it or add some insight its Bug 14854, @ https://bugs.gentoo.org/show_bug.cgi?id=14854.

----------

## Carlo

I experienced the same problem. While I recompiled samba, I looked at smb.conf and didn't found an entry like this: smb passwd file = /etc/samba/smbpasswd.

Maybe that's the reason why samba expects a ldap server?

Carlo

----------

## Klavs

 *Quote:*   

> I experienced the same problem. While I recompiled samba, I looked at smb.conf and didn't found an entry like this: smb passwd file = /etc/samba/smbpasswd.
> 
> Maybe that's the reason why samba expects a ldap server? 

 

Did you try it? I just did, and smbpasswd gives me the exact same error message - and btw. I had smb passwd file = /etc/samba/smbpasswd in my /etc/samba/smb.conf all the time.

So no go on that one  :Smile:  I'm reinstalling my old samba again - thank god for pacakges.

----------

## Carlo

 *Klavs wrote:*   

> Did you try it?

 

No - it was just an idea I had while recompiling samba with negated ldap use flag. I was to lazy to check this assumtion. Sorry.  :Wink: 

Carlo

----------

