# winbind and networkmanager

## zebbedi

I have a new laptop at work, which i've configured to logon to the windows domain using samba / winbind. I'm using a wireless connection on it so set it up using networkmanager. 

If i login using a local account, which starts the wireless then the Active Directory authentication works perfectly in another terminal. However as soon as i log out of that account it no longer works (presumably because the wireless connection is dropped). I've configured samba and pam_winbind to use cached logins, which doesn't seem to work when the connection is dropped. 

How can I work round this? It seems like i need the connection to authenticate, but I can't start the connection until I've authenticated.

----------

## PeGa!

It happened to me some time ago but after a partition failure I reinstalled and now it is working. I'm not saying this is a solution, but I cannot say exactly what happened in the middle.

Some ideas:

- network manager service installed and running in default runlevel (that is, rc-update add NetworkManager default)

- I don't have networkmanager-qt, nor kde-misc/networkmanagement (I had networkmanagement before)

- I have plasma-nm

- Maybe install some cli client for NetworkManager?

- swtich to wicd? (terrible, but it could work)

Hope that helps,

Cheers!

----------

## zebbedi

I've set the connection to be a 'sytem' connection which i think has resolved it. But i've also now got a docking station with a wired connection so haven't tested it 100%. I need to check it with no network connection to make sure i can still log in at all.

----------

## PeGa!

You can set an anacron script (or a custom initscript with a big sleep inside) to write a file if it can ping or connect to an external server. 

The initscript way:

```
#!/bin/bash

start(){

  sleep 120

  ping -c1 google.com > /tmp/nettest.`date +%Y.%m.%d.%H.%M.log` 2>&1

}
```

Just an idea. Hope that helps.

Edit: You can also try to connect from the external network to a single port, like ssh.

Edit 2: That script above is by no means a valid init script. Please use the appropriate template, that is the working part.

----------

