Take the 2-minute tour ×

I executed unsuccessfully the following line in /etc/rc.local with permissions 755:

sudo ifdown 00:1f:9c:c3:b3:77

where the last word is presenting the address of my wlan0 device.

Having the command rfkill block $IP-address-Of-my-wlan0 in startup scripts is not possible solution, since Network-manager is able to change soft-blocks.

You cannot configure each device separately in Network tools or in Network manager. If you change one setting the setting applies to other wifi -device too. I cannot use WICD because I need Network Manager's Mobile Broadband -feature.

How can you put a permanent software block to the given wifi -device in Ubuntu 11.10 at each startup such that other programs such as Network manager do not change it?

There is probably a file which permissions are only needed to be changed to 700 to disallow for example Network Manager to reach the device wlan0. How can you give only the user the permission to touch the device wlan0?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

It's simply not possible to block root access to a file without using something like AppArmor or SELinux.

As long as your two WLAN devices use different drivers, this method should work for you:

First, determine which driver you are using. In my case, from this output:

mark@xiii:/var/log$ sudo dmesg | grep -e 'Ethernet' -e 'WiFi'

...jme 0000:07:00.5: eth0: JMC250 Gigabit Ethernet chiprev:23....[SNIP] ...iwlagn: Intel(R) Wireless WiFi Link AGN driver for Linux, in-tree:

So this tells me my wifi driver is "iwlagn". I can either append blacklist iwlagn to a file in /etc/modprobe.d/ or create a new file, perhaps /etc/modprobe.d/my-personal-blacklist.conf that only contains the line blacklist iwlagn.

share|improve this answer
My dmesg does not have any word Ethernet nor WiFi. Please, see my dmesg output: paste.ubuntu.com/696718. - My Ubuntu 11.10 is at the moment very broken so ignore the other abnormalities. –  Masi Sep 25 '11 at 15:20
My other question related to the topic: askubuntu.com/questions/62937/… –  Masi Sep 25 '11 at 15:32
Hi Masi. It looks like you haven't rebooted in while and it's rolled over somewhat. It's missing the initial device initialization. Can you do a fresh reboot and look again (and repost if needed)? That should capture it. –  Mark Russell Sep 25 '11 at 15:41
I get the following dmesg's output this time: iwl3945 0000:03:00.0: Detected Intel Wireless WiFi Link 3945ABG –  Masi Sep 25 '11 at 16:33
My dmesg is at paste.ubuntu.com/696753 –  Masi Sep 25 '11 at 16:33
show 2 more comments

Your Answer


