# Samba setup problems

## ClippyHater

Everything worked great until smbpasswd -a username.  Here's what happened (wherever you see 'username' I actually used a username that I have been logging in as (non-root)):

```

LDAPS option set...!

feth_ldap_pw: no ldap secret retrieved!

ldap_connection_system: Failed to retrieve password for  from secrets.tdb

LDAPS option set..!

fetch_ldap_pw: no ldap secret retrieved!

ldap_connect_system: Failed to retrieve password for  from secrets.tdb

Failed to add entry for user username

Failed to modify password entry for user username

```

I went ahead and did the /etc/init.d/samba start, and it started fine, but also gave me the following:

```

lpstat: Unable to connect to server: Connection refused

```

----------

## lx

I think you know you're using the ldap option, if you don't run the slapd (ldap server) maybe you should turn the option off, furthermore lpstat is from the cups package (is cupsd running).

Hope this helps,   :Confused: 

Cya lX.

----------

## ClippyHater

Think noob (rather NOOB, all caps  :Smile:  )...

>> I think you know you're using the ldap option

I'm not even sure what an ldap option is...   :Smile: 

>> if you don't run the slapd (ldap server) maybe you should turn the option off

Where would I do this?  Sorry about being a complete noob  :Embarassed:  Should I turn the option off?  Should I be running the ldap server?  Just need network access to a Win2K box on my home network for shares and printing, but would like things to be relatively secure...

----------

## lx

I get the same error with smbpasswd even if I start slapd (ldap) server (need to add some file to ldap config), ldap it's not really needed and maybe you could turn it off in the /etc/make.conf file by adding -ldap to the use flag and rebuild samba. But maybe there's another way to circumvent it. 

Light Weight Directory Access-protocol - it's like a database optimised for reading, tree structure, for a great part used for storing personal information tels / e-mails etc. Not needed on a small network.

To fix the lpstat issue I think you should emerge cups, (you wanna share your printer anyway). I can start and stop samba, the passwd part I haven't figured out yet (well if you want to keep ldap)

I used samba a while ago but well I got a second printer and use ftp to share files, but if I find some time I want to fix it, so people, please give your input.

Hope you fix it,

Cya lX.

----------

## ClippyHater

I really appreciate the info  :Very Happy: 

----------

## ClippyHater

I put -ldap in my make.conf, emerge unmerge samba, then emerge samba.  Rebooted.  Still failing on smbpasswd -a username.  Darn darn darn!

----------

## ClippyHater

Ok, I discovered I need to do an emerge unmerge openldap, then I did an emerge unmerge samba, then an emerge samba.  'smbpasswd -a username' now works, hurray!  But now apache barfs on startup, awww!  This is getting really frustrating!  How many times am I going to have to unmerge/emerge until I find the right combination?!  Arghhh!

----------

## ClippyHater

Ok, I discovered I need to do an emerge unmerge openldap, then I did an emerge unmerge samba, then an emerge samba.  'smbpasswd -a username' now works, hurray!  But now apache barfs on startup, awww!  This is getting really frustrating!  How many times am I going to have to unmerge/emerge until I find the right combination?!  Arghhh!

----------

## lx

```
find /var/db/pkg -iname "*.ebuild" -exec grep -iH ldap {} ';' | grep IUSE
```

more thorough:

```
find /var/db/pkg -iname "*.ebuild" -exec grep -iH ldap {} ';'
```

should give an indication, but there could be packages that don't make use of the USE setting but their configure script find openldap libs on the system and therefore compiles it in (let's just hope not).

Cya lX.

----------

