# nm : cannot detect or add networks - insufficient privileges

## Astronaut

Hello everyone!

Background:

 This is a gentoo system that I've made using a stage4 of a fully functional system, I've just changed rebuilt the kernel using genkernel to make sure that everything is okay and updated the udev rules.

The Problem:

I cannot connect to any wireless AP nor can I detect any, even though with  iwlist  I can detect them (as root only). when I try to add a new connection for example, I get "insufficient privileges" error I'm suspecting a problem with polkit but I'm not sure.

some info:

```
ifconfig -a 
```

http://pastebin.com/rnqJd8V3

```
/etc/conf.d/net
```

http://pastebin.com/PkVxqHgf

```
lspci
```

http://pastebin.com/xuf11eKQ

The driver that I'm using is r8169 and it shows up with lsmod.

what I have done so far

I've noticed that NetworkManager is inactive in rc-status so added rc_hotplug="!net.*" and removed netmount from the default runlevel.

Any help is appreciated!

----------

## eyoung100

 *Astronaut wrote:*   

> 
> 
> what I have done so far
> 
> I've noticed that NetworkManager is inactive in rc-status so added rc_hotplug="!net.*" and removed netmount from the default runlevel.
> ...

 

1. Add Everything back that you took out.

2. Kill Network Manager

3. 

```
/etc/init.d/net.wlan0 stop

iwconfig <NetworkName> ap <AccessPoint MacAddress or auto> txpower on channel < channel number>

/etc/init.d/net.wlan0 start

ping -c3 gentoo.org
```

I need the result of ping to help further.

----------

## Astronaut

hello eyoung100;

I did just like you suggested but I had unexpected results like 

"ping: unknown host gentoo.org"

It suggests that the problem is with DNS which is weird, I didn't even get an IP address and running dhclient would hang with no results

I configured the /etc/resolv.conf with a public DNS and manually configured the IP address, subnet and default gw

This time around I get "Host Unreachable"

Maybe I didn't know how to correctly setup with iwconfig, that's what I've done

```
iwconfig wlan0 essid Area51 ap auto key aaaaaaaaaa txpower on channel 1
```

Tried the same with the current MAC address to no avail

----------

## eyoung100

Connect an ethernet Cable to your Wireless Acess Point.

```
/etc/init.d/net.eth0 start
```

We need to check your router configuration. Try this again:

```
iwconfig wlan0 essid Area51 ap auto key aaaaaaaaaa txpower on channel 1
```

 and add: 

```
ifconfig wlan0
```

  Let's see if you connected...

----------

## Astronaut

Thanks for the suggestion; well tried it but same results.

Please allow me to give you more informations; I have two laptops, the one I'm writing this post from works fine, also when I boot off a live cd on the other faulty one, I can connect too, this specific problem only happens with two distros (one of which is Gentoo) that I've rsync'ed to the new laptop. I wonder if there are some old config files that are creating conflicts

----------

## eyoung100

 *Astronaut wrote:*   

> Thanks for the suggestion; well tried it but same results.
> 
> Please allow me to give you more informations; I have two laptops, the one I'm writing this post from works fine, also when I boot off a live cd on the other faulty one, I can connect too, this specific problem only happens with two distros (one of which is Gentoo) that I've rsync'ed to the new laptop. I wonder if there are some old config files that are creating conflicts

 

Show me the output of:

```
iwconfig wlan0 essid Area51 ap auto key aaaaaaaaaa txpower on channel 1

/etc/init.d/net.wlan0 start

ifconfig wlan0
```

 on the faulty laptop.

----------

## Astronaut

There you go!

http://pastebin.com/k1V376fu

----------

## eyoung100

I apologize I forgot Quotes.  Try:

```
iwconfig wlan0 essid "Area51" ap auto key aaaaaaaaaa txpower on channel 1 

/etc/init.d/net.wlan0 start 

ifconfig wlan0
```

and show me the output

----------

## Astronaut

Same result unfortunately, but, there's a bit of improvement; I've deleted the net.wlan0 symlink and created it back, now I have an idle "wlan0" connection on 

networkmanagement widget and I can edit it or create a bogus AP without the "insufficient privileges" error, do you think that going back and setting up the networking chapter  would be a good idea? http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=1

Thank you for your patience!

----------

## eyoung100

No, You're in the wrong Section. Try Chapter 4: Wireless Networking

----------

## Astronaut

 *eyoung100 wrote:*   

> No, You're in the wrong Section. Try Chapter 4: Wireless Networking

 

Thank you buddy I'll keep you posted!

----------

## Astronaut

After struggling for 1 week now, I'm abandoning this, I'll install a new clean gentoo system, no more stage4 for me!

Thanks for the help!  :Very Happy: 

----------

