# Can't get winbind to work



## bluedalmatian (Jun 13, 2012)

I*'*m having a strange problem with Winbind. I*'*ve installed Samba 3.6 from the 'official' FreeBSD package and I*'*m trying to set up a domain member server with an NT4 based PDC.

I*'*ve set up smb.conf to join the domain and run the *net join* command which succeeded and I can see the Samba machine in Server Manager on the PDC.

I*'*m now trying to set up winbind. I*'*ve added the following to /etc/rc.conf:


```
smbd_enable="YES"
nmbd_enable="YES"
winbindd_enable="YES"
```

and the smb.conf file contains this in addition to the general domain joining stuff which *I**'*ve already tested:


```
#winbind stuff:
        # use uids from 10000 to 20000 for domain users
        idmap uid = 10000-20000
        # use gids from 10000 to 20000 for domain groups
        idmap gid = 10000-20000
        # allow enumeration of winbind users and groups
        winbind enum users = yes
        winbind enum groups = yes
        # give winbind users a real shell
        template homedir = /home/winnt/%D/%U
        template shell = /bin/bash
```

*L*ooking at the process listing it shows winbindd running but when I try to run `wbinfo -u` it just waits for ages then times out saying 
	
	



```
Error looking up domain users
```

The strange thing is if I then try and stop samba it hangs waiting for the winbindd process and I end up having to kill it manually*.*


```
/usr/local/etc/rc.d/samba stop
Stopping winbindd.
Waiting for PIDS: 1611^C
bitsafe# kill -9 1611
bitsafe# /usr/local/etc/rc.d/samba stop
winbindd not running? (check /var/run/samba/winbindd.pid).
Stopping smbd.
Waiting for PIDS: 1603.
Stopping nmbd.
Waiting for PIDS: 1599.
```

If I then manually restart it it seems to launch properly but the same problem exists when I try to use wbinfo and when I try to stop samba again*.*

I was thinking there must be something wrong with winbindd which was causing it to hang after it starts so I tried stopping samba and starting winbindd manually on its own:

```
bitsafe# /usr/local/sbin/winbindd -s /usr/local/etc/smb.conf -S -i
winbindd version 3.6.1 started.
Copyright Andrew Tridgell and the Samba Team 1992-2011
initialize_winbindd_cache: clearing cache and re-creating with version number 2
```

If I then run `wbinfo -u` from a separate terminal it can see the domain users on the PDC!

What I don*'*t understand is why when it*'*s launched from the Samba start script (the one provided by the FreeBSD package) it doesn*'*t work.

Any ideas?

Thanks


----------



## bluedalmatian (Jun 15, 2012)

I should also add I*'*ve edited the nsswitch.conf file by adding winbind to the group and passwd files:


```
nsswitch.conf(5) - name service switch configuration file
# $FreeBSD: release/9.0.0/etc/nsswitch.conf 224765 2011-08-10 20:52:02Z dougb $
#
group: compat winbind
group_compat: nis
hosts: files dns
networks: files
passwd: compat winbind
passwd_compat: nis
shells: files
services: compat
services_compat: nis
protocols: files
rpc: files
```


----------



## TheSkunk (Feb 13, 2017)

Hello, did you resolve this? (I've got a similar issue - Thread 59712)


----------

