Hardcore Linux

Anything about Ubuntu, Centos, openSuSe and Fedora

Category Archives: Wired & Wireless Network

Allow Standard User to connect to wifi on Ubuntu

Still using Ubuntu 12.04, and one of the problem we’ve encountered is it requires normal user to authenticated the designated admin user’s password when connecting to wireless network, which in my opinion doesn’t make sense. How can a normal user access internet over wifi if they aren’t allowed to do so?

Check what google search has to offer, I finally found a fix for this. Adding policykit rules for wifi users.

Create or modify a file  etc/polkit-1/localauthority/50-local.d/52-wifi-management.pkla

$> sudo gedit etc/polkit-1/localauthority/50-local.d/52-wifi-management.pkla

and then enter the following

[Wifi management]

and save on exit.

Add the user to the netdev group

$> sudo usermod -a -G ftp jerry

Restart the system and standard user should now be able to connect to wifi..


Ubuntu 12.04 /etc/resolv.conf implementation with dnsmasq

On the current version of Ubuntu (12.04), you might notice that the current /etc/resolv.conf file always record a nameserver which then resolv dns via dnsmasq, but most of the time after test few things, I found it more problematic. It always disregard my local DNS server, and goes directly to the DNS of my ISP.

If you’re having the same problem like mine, here’s a quickfix:

1. Modify the configuration /etc/NetworkManager/NetworkManager.conf

$> sudo gedit /etc/NetworkManager/NetworkManager.conf

2.  Comment the line that contain “dns=dnsmasq


3. Then restart the network-manager

$> sudo  service network-manager restart

4. Done



Ubuntu 11.04 Shutdown and Restart Problem with CIFS

UPDATE(07/29/2011): The GRUB thing didn’t work at all, back to basic trapping signal via upstart scripts in /etc/init/dbus.conf.  I tried it before using /etc/init/network-manager.conf but on Ubuntu 10.10, it’s not working anymore. Here’s another test and works for me.

1. Modify the current /etc/init/dbus.conf.

$> sudo vi /etc/init/dbus.conf

2. Add a pre-stop script, which looks like this:

pre-stop script
       trap "TERM signal" TERM
      /bin/umount -a -t cifs -l -f
      trap - TERM
end script 

3. Save the script and have a test.

4. Done.

UPDATE(07/28/2011): Found a better alternative via GRUB, link here. Mainly you just need to modify the  /etc/default/grub. Here’s the details:

1. Edit the /etc/default/grub

$> sudo vi /etc/default/grub

2. Add “reboot=pci” on the GRUB_CMDLINE_LINUX line, it should look something like this:

... GRUB_CMDLINE_LINUX="reboot=pci" ...

3. Update the grub

$> sudo update-grub


4. Done


It’s an ancient bug (here), which still exist in Ubuntu 11.04, or even in other distros. When you got a mounted samba shares before the shutdown or restart process, the machine waits for around 10 minutes before it complete the operation. Very troublesome that’s why I tried various workaround but none of them  works with Ubuntu 11.04. Not even the /etc/rc6.d/K*  or the upstart /etc/init configurations, nor the old python script I posted before (here’s the link).

After few considerations, I made a desperate workaround, creating a script that triggers before the /sbin/shutdown, /sbin/reboot and /sbin/restart commands.

1. Rename the current shutdown, reboot and restart commands in /sbin.

#> mv /sbin/shutdown /sbin/shutdown2
#> mv /sbin/reboot /sbin/reboot2
#> mv /sbin/restart /sbin/restart2 

2. Then create scripts with names of the previous commands in /sbin, which contains the following:

umount -t cifs -a -f -l
/sbin/shutdown2 $@
exit 0 

3. Make similar script for reboot and restart command which also points to /sbin/reboot2 and /sbin/restart2.

4.  Until the dbus implementation of stop on deconfiguring-networking comes to Ubuntu 11.04, which I think working with
Ubuntu 11.10 oneiric. I think this is the least workaround that works for me.

5. Done

Ubuntu 10.10: Problem with static IP address and network-manager

As of Ubuntu 10.10, I find network-manager problematic, since it alters the static IP address you’ve configured in /etc/network/interfaces.  This is even though you successfully configured the static IP address and stuff. Network-Manager still override them with and use the IP the DHCP had given.

So for now my only fix is to uninstall network-manager and packages related to it.

#> sudo apt-get purge network-manager network-manager-gnome

After this, the static IP address configured in /etc/network/interfaces will be working fine.



Intel 5100 AGN on Ubuntu 10.04

For me this is a critical bug, because I’m frequently using my Lenovo SL400 on wireless networks. The problem is related to Intel 5100 AGN on Ubuntu 10.04. It connects fine on the start but degrades until it eventually disconnects to the wireless access point. Sometimes I have to reboot to be able to connect to the wireless network again. I’ve been experiencing this  until I’ve found this workaround (click here).

Here’s the fix (But it’s very ugly):

1. Create a new modprobe configuration, let’s call it options.conf

$sudo vi /etc/modprobe.d/options.conf

2. Add the following code:

options iwlagn 11n_disable=1 11n_disable50=1

3. Reboot the system and check if it fixes your Intel 5100 AGN wireless device’s problem.

4. Done.

%d bloggers like this: