个人工具

“UbuntuHelp:WifiDocs/NetworkManager”的版本间的差异

来自Ubuntu中文

跳转至: 导航, 搜索
第1行: 第1行:
 
{{From|https://help.ubuntu.com/community/WifiDocs/NetworkManager}}
 
{{From|https://help.ubuntu.com/community/WifiDocs/NetworkManager}}
 
{{Languages|UbuntuHelp:WifiDocs/NetworkManager}}
 
{{Languages|UbuntuHelp:WifiDocs/NetworkManager}}
 
 
 
== Network Manager ==
 
== Network Manager ==
 
 
Network Manager aims for Network Connectivity which "Just Works". The computer should use the wired network connection when it's plugged in, but automatically switch to a wireless connection when the user unplugs it and walks away from the desk. Likewise, when the user plugs the computer back in, the computer should switch back to the wired connection. The user should, most times, not even notice that their connection has has been managed for them; they should simply see uninterrupted network connectivity.
 
Network Manager aims for Network Connectivity which "Just Works". The computer should use the wired network connection when it's plugged in, but automatically switch to a wireless connection when the user unplugs it and walks away from the desk. Likewise, when the user plugs the computer back in, the computer should switch back to the wired connection. The user should, most times, not even notice that their connection has has been managed for them; they should simply see uninterrupted network connectivity.
 
 
More information about Network Manager is available [http://www.gnome.org/projects/NetworkManager/ here] .
 
More information about Network Manager is available [http://www.gnome.org/projects/NetworkManager/ here] .
 
+
Network Manager is '''beta''' software. You can find packages in [http://packages.ubuntu.com/dapper/net/network-manager dapper/universe], [http://packages.ubuntu.com/edgy/net/network-manager edgy/universe], [http://packages.ubuntu.com/feisty/net/network-manager feisty/main], [http://packages.ubuntu.com/gutsy/net/network-manager gutsy/main].
Network Manager is '''beta''' software. You can find packages in [http://packages.ubuntu.com/breezy/net/network-manager breezy/universe], [http://packages.ubuntu.com/dapper/net/network-manager dapper/universe], [http://packages.ubuntu.com/edgy/net/network-manager edgy/universe], [http://packages.ubuntu.com/feisty/net/network-manager feisty/main].
+
 
+
 
=== Installation ===
 
=== Installation ===
 
+
==== Ubuntu 6.06 LTS (Dapper), Ubuntu 6.10 (Edgy), Ubuntu 7.04 (Feisty), Ubuntu 7.10 (Gutsy) ====
==== Ubuntu 6.06 LTS (Dapper), Ubuntu 6.10 (Edgy), Ubuntu 7.04 (Feisty) ====
+
# Applications, Add/Remove Programs
 
+
# Find Network Manager in the Internet section
* Applications, Add/Remove Programs
+
# Check the adjacent box to select Network Manager for installation
* Find Network Manager in the Internet section
+
# Click OK
* Check the adjacent box to select Network Manager for installation
+
# Log out and back in again
* Click OK
+
# If you don't see the Network Manager icon you may need to add the Notification Area to your panel
* Log out and back in again
+
* If you don't see the Network Manager icon you may need to add the Notification Area to your panel
+
 
+
===== Kubuntu 6.10 (Edgy) =====
+
Have a look at [[UbuntuHelp:WifiDocs/WPAHowTo/Kubuntu]] for a tutorial.
+
 
+
==== Ubuntu 5.10 (Breezy) ====
+
 
+
* Enable Universe (AddingRepositoriesHowto)
+
* Install Network Manager and its dependencies by <code><nowiki>network-manager</nowiki></code>
+
* Log out and back in again
+
 
+
 
==== Configuring Devices ====
 
==== Configuring Devices ====
 
 
Any already configured devices that you want to be available in Network Manager will need to ''de-configured'', as otherwise they will be ignored.
 
Any already configured devices that you want to be available in Network Manager will need to ''de-configured'', as otherwise they will be ignored.
 
 
The easiest way to do this is by going to System -> Administration -> Networking and then going to "Properties" of each connection. In Properties, just ''untick'' the "Enable this connection" checkbox. Logout then log back in again. These connections should now be available in Network Manager.
 
The easiest way to do this is by going to System -> Administration -> Networking and then going to "Properties" of each connection. In Properties, just ''untick'' the "Enable this connection" checkbox. Logout then log back in again. These connections should now be available in Network Manager.
 
 
OR, the harder way, is to backup and then edit the `/etc/network/interfaces` file to remove the configuration of these devices (except for '''lo''' which is needed for the loopback interface). You will have to save the file and reboot for the changes to take effect (or don't reboot and run `/etc/init.d/networking restart` instead). For example, if you wanted Network Manager to be able to control all of your devices, your `/etc/network/interfaces` file would look somewhat like the following:
 
OR, the harder way, is to backup and then edit the `/etc/network/interfaces` file to remove the configuration of these devices (except for '''lo''' which is needed for the loopback interface). You will have to save the file and reboot for the changes to take effect (or don't reboot and run `/etc/init.d/networking restart` instead). For example, if you wanted Network Manager to be able to control all of your devices, your `/etc/network/interfaces` file would look somewhat like the following:
 
<pre><nowiki>
 
<pre><nowiki>
第42行: 第21行:
 
iface lo inet loopback
 
iface lo inet loopback
 
</nowiki></pre>
 
</nowiki></pre>
 
 
[[Anchor(Suspend)]]
 
[[Anchor(Suspend)]]
 
==== Suspend support ====
 
==== Suspend support ====
 
 
At this point your connection won't survive suspend or hibernate. You have to create two files for that:
 
At this point your connection won't survive suspend or hibernate. You have to create two files for that:
 
 
* /etc/acpi/suspend.d/07-network-manager.sh
 
* /etc/acpi/suspend.d/07-network-manager.sh
 
<pre><nowiki>
 
<pre><nowiki>
第58行: 第34行:
 
/etc/dbus-1/event.d/25NetworkManager start
 
/etc/dbus-1/event.d/25NetworkManager start
 
</nowiki></pre>
 
</nowiki></pre>
 
 
[[Anchor(Keyring)]]
 
[[Anchor(Keyring)]]
 
==== Automatic Keyring ====
 
==== Automatic Keyring ====
 
 
To bypass having to enter the keyring password at every login when your keyring password is the same as your login password, follow the following instructions:
 
To bypass having to enter the keyring password at every login when your keyring password is the same as your login password, follow the following instructions:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
naaman@freddo:~$ sudo apt-get install libpam-keyring
 
naaman@freddo:~$ sudo apt-get install libpam-keyring
 
naaman@freddo:~$ echo "@include common-pamkeyring" | sudo tee -a /etc/pam.d/gdm
 
naaman@freddo:~$ echo "@include common-pamkeyring" | sudo tee -a /etc/pam.d/gdm
 
</nowiki></pre>
 
</nowiki></pre>
 
 
To change keyring password, install libpam-keyring as above then run:
 
To change keyring password, install libpam-keyring as above then run:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
naaman@freddo:~$ /usr/lib/libpam-keyring/pam-keyring-tool -c
 
naaman@freddo:~$ /usr/lib/libpam-keyring/pam-keyring-tool -c
 
</nowiki></pre>
 
</nowiki></pre>
 
 
=== VPN support ===
 
=== VPN support ===
 
 
Network Manager VPN support is based on a plug-in system. You can download some plugins (cisco vpn, openvpn, pptp) form [http://bootlab.org/~j/NetworkManager here]. They are built for Debian but they work very well on my Ubuntu 6.06, no warning, no errors... just be sure to restart your Network Manager daemon. Edgy has the network-manager-pptp package which provides the Network Manager pptp plugin.
 
Network Manager VPN support is based on a plug-in system. You can download some plugins (cisco vpn, openvpn, pptp) form [http://bootlab.org/~j/NetworkManager here]. They are built for Debian but they work very well on my Ubuntu 6.06, no warning, no errors... just be sure to restart your Network Manager daemon. Edgy has the network-manager-pptp package which provides the Network Manager pptp plugin.
 
 
==== VPN support for Kubuntu Feisty 7.04 ====
 
==== VPN support for Kubuntu Feisty 7.04 ====
 
If you need VPN support via network manager in Kubuntu Feisty you have to install the following packages:
 
If you need VPN support via network manager in Kubuntu Feisty you have to install the following packages:
第96行: 第64行:
 
</nowiki></pre>
 
</nowiki></pre>
 
if you prefer apt-get over aptitude.
 
if you prefer apt-get over aptitude.
 
 
Unfortunately the network-manager-gnome packages is not a dependency of the VPN packages, so you have to add it manually. Otherwise clicking on 'Configure VPN' does not have any effect and you cannot add VPN connections. This is due to bug [https://bugs.launchpad.net/ubuntu/+source/network-manager-openvpn/+bug/113505 113505]
 
Unfortunately the network-manager-gnome packages is not a dependency of the VPN packages, so you have to add it manually. Otherwise clicking on 'Configure VPN' does not have any effect and you cannot add VPN connections. This is due to bug [https://bugs.launchpad.net/ubuntu/+source/network-manager-openvpn/+bug/113505 113505]
 
 
=== Notes ===
 
=== Notes ===
 
 
==== Gnome ====
 
==== Gnome ====
 
Go to System -> Preferences -> Sessions
 
Go to System -> Preferences -> Sessions
第106行: 第71行:
 
type "nm-applet", click OK.
 
type "nm-applet", click OK.
 
log out of your gnome session, and log back in again.
 
log out of your gnome session, and log back in again.
 
 
==== Other Window Managers/Desktop Environments ====
 
==== Other Window Managers/Desktop Environments ====
 
add '''nm-applet''' to your startup
 
add '''nm-applet''' to your startup
 
 
Note: '''nm-applet''' is now part of the '''network-manager-gnome''' package which is recommended when you install the '''network-manager''' package but may not have been installed.  
 
Note: '''nm-applet''' is now part of the '''network-manager-gnome''' package which is recommended when you install the '''network-manager''' package but may not have been installed.  
 
 
==== Not showing wireless network using Ndiswrapper. ====
 
==== Not showing wireless network using Ndiswrapper. ====
 
You must add Ndiswrapper to /etc/modules so it loads correctly
 
You must add Ndiswrapper to /etc/modules so it loads correctly
第117行: 第79行:
 
gksudo gedit /etc/modules
 
gksudo gedit /etc/modules
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Add on a new line: "ndiswrapper"
 
Add on a new line: "ndiswrapper"
 
Save and reboot.
 
Save and reboot.
 
 
==== Compiling from svn  ====
 
==== Compiling from svn  ====
 
If you know what you are doing and want to compile from CVS you can get build dependencies, checkout CVS and compile it by running:
 
If you know what you are doing and want to compile from CVS you can get build dependencies, checkout CVS and compile it by running:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo apt-get build-dep network-manager
 
sudo apt-get build-dep network-manager
第134行: 第93行:
 
sudo make install
 
sudo make install
 
</nowiki></pre>
 
</nowiki></pre>
 
 
=== Issues ===
 
=== Issues ===
 
If nm-applet gives this error message
 
If nm-applet gives this error message
第140行: 第98行:
 
WARNING **: <WARNING>  (): nmwa_dbus_init() could not acquire its service.  dbus_bus_acquire_service() says: 'Connection ":1.26" is not allowed to own the service "org.freedesktop.NetworkManagerInfo" due to security policies in  the configuration file'
 
WARNING **: <WARNING>  (): nmwa_dbus_init() could not acquire its service.  dbus_bus_acquire_service() says: 'Connection ":1.26" is not allowed to own the service "org.freedesktop.NetworkManagerInfo" due to security policies in  the configuration file'
 
</nowiki></pre>
 
</nowiki></pre>
 
 
try launching nm-applet with
 
try launching nm-applet with
 
<pre><nowiki>
 
<pre><nowiki>
 
nm-applet --sm-disable
 
nm-applet --sm-disable
 
</nowiki></pre>
 
</nowiki></pre>
 
 
If it still dosen't work you'd have to edit the dbus-1 configuration files for both Network``Manager and nm-applet (this might be a security compromise, if there's another way to get nm-applet to work, please add it here).
 
If it still dosen't work you'd have to edit the dbus-1 configuration files for both Network``Manager and nm-applet (this might be a security compromise, if there's another way to get nm-applet to work, please add it here).
 
 
Change the default policy context in both /etc/dbus-1/system.d/NetworkManager.conf and /etc/dbus-1/system.d/nm-applet.conf so it says 'allow' instead of 'deny'.
 
Change the default policy context in both /etc/dbus-1/system.d/NetworkManager.conf and /etc/dbus-1/system.d/nm-applet.conf so it says 'allow' instead of 'deny'.
 
<pre><nowiki>
 
<pre><nowiki>
第156行: 第111行:
 
</policy>
 
</policy>
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Then restart dbus
 
Then restart dbus
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo /etc/init.d/dbus restart
 
sudo /etc/init.d/dbus restart
 
</nowiki></pre>
 
</nowiki></pre>
 
 
and launch the applet
 
and launch the applet
 
<pre><nowiki>
 
<pre><nowiki>
 
nm-applet
 
nm-applet
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Another way to work around this security issue is to add yourself to the netdev group.  The default security policy permits access for that group.
 
Another way to work around this security issue is to add yourself to the netdev group.  The default security policy permits access for that group.
 
 
'''Note:''' if you upgraded from Breezy to Dapper '''and''' you had modified files in /etc/pam.d/ it is possible that they were not altered properly to include a reference to the pam_foreground module. /etc/pam.d/common-session should look like this:
 
'''Note:''' if you upgraded from Breezy to Dapper '''and''' you had modified files in /etc/pam.d/ it is possible that they were not altered properly to include a reference to the pam_foreground module. /etc/pam.d/common-session should look like this:
 
<pre><nowiki>
 
<pre><nowiki>
第174行: 第125行:
 
session required        pam_unix.so
 
session required        pam_unix.so
 
</nowiki></pre>
 
</nowiki></pre>
This will also affect [http://live.gnome.org/PowerManager Gnome Power Manager] and Gnome Volume Manager. See [https://launchpad.net/distros/ubuntu/+source/libpam-foreground/+bug/34063 this bug] for more info.
+
This will also affect [http://live.gnome.org/PowerManager Gnome Power Manager] and Gnome Volume Manager. See [https://launchpad.net/ubuntu/+source/libpam-foreground/+bug/34063 this bug] for more info.
 
[[Anchor(dapper)]]
 
[[Anchor(dapper)]]
 
==== Ubuntu 6.06 (Dapper) ====
 
==== Ubuntu 6.06 (Dapper) ====
第182行: 第133行:
 
sudo nano /etc/network/interfaces
 
sudo nano /etc/network/interfaces
 
</nowiki></pre>
 
</nowiki></pre>
 
 
It should look similar to this when you are done:
 
It should look similar to this when you are done:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
# This file describes the network interfaces available on your system
 
# This file describes the network interfaces available on your system
 
# and how to activate them. For more information, see interfaces(5).
 
# and how to activate them. For more information, see interfaces(5).
 
 
# The loopback network interface
 
# The loopback network interface
 
auto lo
 
auto lo
 
iface lo inet loopback
 
iface lo inet loopback
 
 
# This is a list of hotpluggable network interfaces.
 
# This is a list of hotpluggable network interfaces.
 
# They will be activated automatically by the hotplug subsystem.
 
# They will be activated automatically by the hotplug subsystem.
 
# auto eth1
 
# auto eth1
 
 
# iface eth1 inet dhcp
 
# iface eth1 inet dhcp
 
</nowiki></pre>
 
</nowiki></pre>
 
Then reboot and you should be good to go!
 
Then reboot and you should be good to go!
 
 
=== Alternative Version (no BIND dependency) ===
 
=== Alternative Version (no BIND dependency) ===
 
 
There is an alternative version of Network Manager (for Breezy) that has no BIND dependency.  Some people have DNS troubles with the version in the repos, and removing the BIND dependency eliminates a possible security hole (not that BIND is insecure, but eliminating it only improves security).  Look at [http://wildbill.nulldevice.net/archives/000148.html this page] for more information and to download necessary packages.  Additional information is available [http://pykeylogger.sourceforge.net/wiki/index.php/Ubuntu:Chronicles#Multiple_Wireless_Profiles here].
 
There is an alternative version of Network Manager (for Breezy) that has no BIND dependency.  Some people have DNS troubles with the version in the repos, and removing the BIND dependency eliminates a possible security hole (not that BIND is insecure, but eliminating it only improves security).  Look at [http://wildbill.nulldevice.net/archives/000148.html this page] for more information and to download necessary packages.  Additional information is available [http://pykeylogger.sourceforge.net/wiki/index.php/Ubuntu:Chronicles#Multiple_Wireless_Profiles here].
 
 
=== WPASupplicant Problems in Ubuntu 6.06 ===
 
=== WPASupplicant Problems in Ubuntu 6.06 ===
 
 
Network Manager 0.6 started to use WPAsupplicant for all encrypted connection. This can be a problem as a number of drivers do not support all needed interfaces for WPAsupplicant yet. If you do not need WPA, then you can downgrade to NM 0.5. You need to download the following packages.
 
Network Manager 0.6 started to use WPAsupplicant for all encrypted connection. This can be a problem as a number of drivers do not support all needed interfaces for WPAsupplicant yet. If you do not need WPA, then you can downgrade to NM 0.5. You need to download the following packages.
 
 
==== x86 ====
 
==== x86 ====
https://launchpad.net/distros/ubuntu/dapper/i386/network-manager/0.5.1-0ubuntu19
+
https://launchpad.net/ubuntu/dapper/i386/network-manager/0.5.1-0ubuntu19
https://launchpad.net/distros/ubuntu/dapper/i386/nm-applet/0.5.1-0ubuntu19
+
https://launchpad.net/ubuntu/dapper/i386/nm-applet/0.5.1-0ubuntu19
 
==== amd64 ====
 
==== amd64 ====
https://launchpad.net/distros/ubuntu/dapper/amd64/network-manager/0.5.1-0ubuntu19
+
https://launchpad.net/ubuntu/dapper/amd64/network-manager/0.5.1-0ubuntu19
https://launchpad.net/distros/ubuntu/dapper/amd64/nm-applet/0.5.1-0ubuntu19
+
https://launchpad.net/ubuntu/dapper/amd64/nm-applet/0.5.1-0ubuntu19
 
==== powerpc ====
 
==== powerpc ====
https://launchpad.net/distros/ubuntu/dapper/powerpc/network-manager/0.5.1-0ubuntu19
+
https://launchpad.net/ubuntu/dapper/powerpc/network-manager/0.5.1-0ubuntu19
https://launchpad.net/distros/ubuntu/dapper/powerpc/nm-applet/0.5.1-0ubuntu19
+
https://launchpad.net/ubuntu/dapper/powerpc/nm-applet/0.5.1-0ubuntu19
 
+
 
these can be installed by double clicking, or using  
 
these can be installed by double clicking, or using  
 
<code><nowiki>dpkg -i packagename.deb</nowiki></code>
 
<code><nowiki>dpkg -i packagename.deb</nowiki></code>
 
 
=== Disabling NetworkManager ===
 
=== Disabling NetworkManager ===
 
 
According to [https://launchpad.net/bugs/82335 this bug] here's how to disable Network Manager without uninstalling it:
 
According to [https://launchpad.net/bugs/82335 this bug] here's how to disable Network Manager without uninstalling it:
 
 
Stop network manager
 
Stop network manager
 
 
<pre><nowiki>
 
<pre><nowiki>
 
sudo /etc/dbus-1/event.d/26NetworkManagerDispatcher stop
 
sudo /etc/dbus-1/event.d/26NetworkManagerDispatcher stop
 
sudo /etc/dbus-1/event.d/25NetworkManager stop
 
sudo /etc/dbus-1/event.d/25NetworkManager stop
 
</nowiki></pre>
 
</nowiki></pre>
 
 
Create two files with only the word 'exit' in them. These files are:
 
Create two files with only the word 'exit' in them. These files are:
 
 
<pre><nowiki>
 
<pre><nowiki>
 
/etc/default/NetworkManager
 
/etc/default/NetworkManager
第246行: 第180行:
 
</nowiki></pre>
 
</nowiki></pre>
 
Now navigate to system -> networking -> wireless -> networks. There you will find separate directories for each network under it's network name (essid).
 
Now navigate to system -> networking -> wireless -> networks. There you will find separate directories for each network under it's network name (essid).
 
 
==== Preventing automatic connection to particular networks ====
 
==== Preventing automatic connection to particular networks ====
 
In gconf-editor select the essid of the network you wish to edit. For each of the keys, right-click the key and select Unset Key... Once done quit gconf-editor. If you reopen gconf-editor, you will now see that the network has been removed.
 
In gconf-editor select the essid of the network you wish to edit. For each of the keys, right-click the key and select Unset Key... Once done quit gconf-editor. If you reopen gconf-editor, you will now see that the network has been removed.
 
This will only prevent automatic connection to a network, you can manually re-connect at any time.
 
This will only prevent automatic connection to a network, you can manually re-connect at any time.
 
 
==== Ensuring connection to particular access points ====
 
==== Ensuring connection to particular access points ====
 
In gconf-editor select the essid of the network you wish to edit. Right-click on the bssids key and choose Edit Key... Remove the bssid values of the access points that you do not wish to connect to, leaving the ones that you do wish to connect to. Click OK and then quit Gconf-editor.
 
In gconf-editor select the essid of the network you wish to edit. Right-click on the bssids key and choose Edit Key... Remove the bssid values of the access points that you do not wish to connect to, leaving the ones that you do wish to connect to. Click OK and then quit Gconf-editor.
 
 
For further information see the Network Manager [http://live.gnome.org/DarrenAlbers/NetworkManagerFAQ FAQ]
 
For further information see the Network Manager [http://live.gnome.org/DarrenAlbers/NetworkManagerFAQ FAQ]
 
 
=== User comments ===
 
=== User comments ===
 
 
1) An interesting thing happens if you combine Network Manager with [[UbuntuHelp:Wifidocs/Driver/Ndiswrapper]]. Since the command "ndiswrapper -m" only creates an alias, eg. "alias wlan0 ndiswrapper", the module will only be loaded when the interface wlan0 is used. But since Network Manager requires an empty interfaces list, ndiswrapper never gets loaded. A possible fix is to add a line "ndiswrapper" to /etc/modules. I hope this is the right place for this comment, YungChinOei
 
1) An interesting thing happens if you combine Network Manager with [[UbuntuHelp:Wifidocs/Driver/Ndiswrapper]]. Since the command "ndiswrapper -m" only creates an alias, eg. "alias wlan0 ndiswrapper", the module will only be loaded when the interface wlan0 is used. But since Network Manager requires an empty interfaces list, ndiswrapper never gets loaded. A possible fix is to add a line "ndiswrapper" to /etc/modules. I hope this is the right place for this comment, YungChinOei
 
 
2) If you get the error.. "The Network``Manager applet could not find some required resources. It cannot continue."
 
2) If you get the error.. "The Network``Manager applet could not find some required resources. It cannot continue."
 
 
Open up a terminal & type in .. sudo gtk-update-icon-cache -f /usr/share/icons/hicolor/
 
Open up a terminal & type in .. sudo gtk-update-icon-cache -f /usr/share/icons/hicolor/
 
 
I've only come across this error once, & this fixed it straight up :D
 
I've only come across this error once, & this fixed it straight up :D
 
 
3) I have problems connecting to a hidden access point. Switching the SSID broadcast on solves the problem, but it's a security issue.
 
3) I have problems connecting to a hidden access point. Switching the SSID broadcast on solves the problem, but it's a security issue.
 
 
Try going to "connect to another network" or something like that in the applet menu, then enter the SSID.
 
Try going to "connect to another network" or something like that in the applet menu, then enter the SSID.
 
It won't work, at least not for me. Please have a look at [https://bugs.launchpad.net/bugs/50214 this bug].
 
It won't work, at least not for me. Please have a look at [https://bugs.launchpad.net/bugs/50214 this bug].
 
This bug is open for quite a long time, and it seems it is caused by a mismatch between Wireless Tools and Wireless Extensions of the kernel.
 
This bug is open for quite a long time, and it seems it is caused by a mismatch between Wireless Tools and Wireless Extensions of the kernel.
 
 
I get the following: iwconfig --version
 
I get the following: iwconfig --version
 
iwconfig Wireless-Tools version 29
 
iwconfig Wireless-Tools version 29
 
Compatible with Wireless Extension v11 to v21.
 
Compatible with Wireless Extension v11 to v21.
 
 
Kernel Currently compiled with Wireless Extension v22.
 
Kernel Currently compiled with Wireless Extension v22.
 
 
ath0 Recommended Wireless Extension v13 or later,
 
ath0 Recommended Wireless Extension v13 or later,
 
Currently compiled with Wireless Extension v22
 
Currently compiled with Wireless Extension v22
 
 
-- Ubuntu:PeterWhittaker, 20070326: Cloaking the SSID serves little purpose because it is easily discoverable: Anyone who wants to access your network illicitly will be able to discover your SSID using commonly available tools, with minimum effort. While an SSID is not quite analogous to an IP address, the analogy is good: The SSID appears outside the security envelope in communications between the client and the access point. If you are concerned with security, use WPA, preferably WPA2 (RSN), with a strong cipher (AES). I would argue that SSID cloaking capabilities are a hold-over hack from the "bad old days" of WEP, when there was no effective wireless security and people were scrambling to at least achieve the "appearance" of security (while doing very little to become secure).
 
-- Ubuntu:PeterWhittaker, 20070326: Cloaking the SSID serves little purpose because it is easily discoverable: Anyone who wants to access your network illicitly will be able to discover your SSID using commonly available tools, with minimum effort. While an SSID is not quite analogous to an IP address, the analogy is good: The SSID appears outside the security envelope in communications between the client and the access point. If you are concerned with security, use WPA, preferably WPA2 (RSN), with a strong cipher (AES). I would argue that SSID cloaking capabilities are a hold-over hack from the "bad old days" of WEP, when there was no effective wireless security and people were scrambling to at least achieve the "appearance" of security (while doing very little to become secure).
 
 
4) I could not connect to a Windows VPN (PPTP) unless I manually set the MTU and MRU to 1500. No error message other than "Could not connect" was reported. So try this easy change if you can't connect.
 
4) I could not connect to a Windows VPN (PPTP) unless I manually set the MTU and MRU to 1500. No error message other than "Could not connect" was reported. So try this easy change if you can't connect.
 
 
5) I'd love to be able to set manually an ip for a given ESSID, but still autodetect other networks while I move.
 
5) I'd love to be able to set manually an ip for a given ESSID, but still autodetect other networks while I move.
 
 
----
 
----
 
[[category:CategoryDocumentation]] [[category:CategoryCleanup]]
 
[[category:CategoryDocumentation]] [[category:CategoryCleanup]]
  
 
[[category:UbuntuHelp]]
 
[[category:UbuntuHelp]]

2007年11月30日 (五) 22:25的版本

Network Manager

Network Manager aims for Network Connectivity which "Just Works". The computer should use the wired network connection when it's plugged in, but automatically switch to a wireless connection when the user unplugs it and walks away from the desk. Likewise, when the user plugs the computer back in, the computer should switch back to the wired connection. The user should, most times, not even notice that their connection has has been managed for them; they should simply see uninterrupted network connectivity. More information about Network Manager is available here . Network Manager is beta software. You can find packages in dapper/universe, edgy/universe, feisty/main, gutsy/main.

Installation

Ubuntu 6.06 LTS (Dapper), Ubuntu 6.10 (Edgy), Ubuntu 7.04 (Feisty), Ubuntu 7.10 (Gutsy)

  1. Applications, Add/Remove Programs
  2. Find Network Manager in the Internet section
  3. Check the adjacent box to select Network Manager for installation
  4. Click OK
  5. Log out and back in again
  6. If you don't see the Network Manager icon you may need to add the Notification Area to your panel

Configuring Devices

Any already configured devices that you want to be available in Network Manager will need to de-configured, as otherwise they will be ignored. The easiest way to do this is by going to System -> Administration -> Networking and then going to "Properties" of each connection. In Properties, just untick the "Enable this connection" checkbox. Logout then log back in again. These connections should now be available in Network Manager. OR, the harder way, is to backup and then edit the `/etc/network/interfaces` file to remove the configuration of these devices (except for lo which is needed for the loopback interface). You will have to save the file and reboot for the changes to take effect (or don't reboot and run `/etc/init.d/networking restart` instead). For example, if you wanted Network Manager to be able to control all of your devices, your `/etc/network/interfaces` file would look somewhat like the following:

auto lo
iface lo inet loopback

Anchor(Suspend)

Suspend support

At this point your connection won't survive suspend or hibernate. You have to create two files for that:

  • /etc/acpi/suspend.d/07-network-manager.sh
#!/bin/sh
/etc/dbus-1/event.d/25NetworkManager stop
  • /etc/acpi/resume.d/63-network-manager.sh
#!/bin/sh
/etc/dbus-1/event.d/25NetworkManager start

Anchor(Keyring)

Automatic Keyring

To bypass having to enter the keyring password at every login when your keyring password is the same as your login password, follow the following instructions:

naaman@freddo:~$ sudo apt-get install libpam-keyring
naaman@freddo:~$ echo "@include common-pamkeyring" | sudo tee -a /etc/pam.d/gdm

To change keyring password, install libpam-keyring as above then run:

naaman@freddo:~$ /usr/lib/libpam-keyring/pam-keyring-tool -c

VPN support

Network Manager VPN support is based on a plug-in system. You can download some plugins (cisco vpn, openvpn, pptp) form here. They are built for Debian but they work very well on my Ubuntu 6.06, no warning, no errors... just be sure to restart your Network Manager daemon. Edgy has the network-manager-pptp package which provides the Network Manager pptp plugin.

VPN support for Kubuntu Feisty 7.04

If you need VPN support via network manager in Kubuntu Feisty you have to install the following packages:

network-manager-gnome
network-manager-openvpn
network-manager-pptp
network-manager-vpnc

You can install the packages via 'Adept Manager' or on the command line with:

sudo aptitude install network-manager-gnome network-manager-openvpn network-manager-pptp network-manager-vpnc

or

sudo apt-get install network-manager-gnome network-manager-openvpn network-manager-pptp network-manager-vpnc

if you prefer apt-get over aptitude. Unfortunately the network-manager-gnome packages is not a dependency of the VPN packages, so you have to add it manually. Otherwise clicking on 'Configure VPN' does not have any effect and you cannot add VPN connections. This is due to bug 113505

Notes

Gnome

Go to System -> Preferences -> Sessions In the Startup Programs tab, click Add type "nm-applet", click OK. log out of your gnome session, and log back in again.

Other Window Managers/Desktop Environments

add nm-applet to your startup Note: nm-applet is now part of the network-manager-gnome package which is recommended when you install the network-manager package but may not have been installed.

Not showing wireless network using Ndiswrapper.

You must add Ndiswrapper to /etc/modules so it loads correctly

gksudo gedit /etc/modules

Add on a new line: "ndiswrapper" Save and reboot.

Compiling from svn

If you know what you are doing and want to compile from CVS you can get build dependencies, checkout CVS and compile it by running:

sudo apt-get build-dep network-manager
sudo apt-get install ppp-dev
svn co svn://svn.gnome.org/svn/NetworkManager/trunk NetworkManager
cd NetworkManager
./autogen.sh --prefix=/usr --sysconfdir=/etc --localstatedir=/var
./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
make
sudo make install

Issues

If nm-applet gives this error message

WARNING **: <WARNING>   (): nmwa_dbus_init() could not acquire its service.  dbus_bus_acquire_service() says: 'Connection ":1.26" is not allowed to own the service "org.freedesktop.NetworkManagerInfo" due to security policies in  the configuration file'

try launching nm-applet with

nm-applet --sm-disable

If it still dosen't work you'd have to edit the dbus-1 configuration files for both Network``Manager and nm-applet (this might be a security compromise, if there's another way to get nm-applet to work, please add it here). Change the default policy context in both /etc/dbus-1/system.d/NetworkManager.conf and /etc/dbus-1/system.d/nm-applet.conf so it says 'allow' instead of 'deny'.

<policy context="default">
<allow own="org.freedesktop.NetworkManager"/>
<allow send_destination="org.freedesktop.NetworkManager"/>
<allow send_interface="org.freedesktop.NetworkManager"/>
</policy>

Then restart dbus

sudo /etc/init.d/dbus restart

and launch the applet

nm-applet

Another way to work around this security issue is to add yourself to the netdev group. The default security policy permits access for that group. Note: if you upgraded from Breezy to Dapper and you had modified files in /etc/pam.d/ it is possible that they were not altered properly to include a reference to the pam_foreground module. /etc/pam.d/common-session should look like this:

session required        pam_foreground.so
session required        pam_unix.so

This will also affect Gnome Power Manager and Gnome Volume Manager. See this bug for more info. Anchor(dapper)

Ubuntu 6.06 (Dapper)

If it is not managing your network connections after upgrading to Dapper, you'll need to comment out the references to all interfaces (except lo) in /etc/network/interfaces to let Network Manager handle them.

sudo cp /etc/network/interfaces /etc/network/interfaces.bak
sudo nano /etc/network/interfaces

It should look similar to this when you are done:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
# auto eth1
# iface eth1 inet dhcp

Then reboot and you should be good to go!

Alternative Version (no BIND dependency)

There is an alternative version of Network Manager (for Breezy) that has no BIND dependency. Some people have DNS troubles with the version in the repos, and removing the BIND dependency eliminates a possible security hole (not that BIND is insecure, but eliminating it only improves security). Look at this page for more information and to download necessary packages. Additional information is available here.

WPASupplicant Problems in Ubuntu 6.06

Network Manager 0.6 started to use WPAsupplicant for all encrypted connection. This can be a problem as a number of drivers do not support all needed interfaces for WPAsupplicant yet. If you do not need WPA, then you can downgrade to NM 0.5. You need to download the following packages.

x86

https://launchpad.net/ubuntu/dapper/i386/network-manager/0.5.1-0ubuntu19 https://launchpad.net/ubuntu/dapper/i386/nm-applet/0.5.1-0ubuntu19

amd64

https://launchpad.net/ubuntu/dapper/amd64/network-manager/0.5.1-0ubuntu19 https://launchpad.net/ubuntu/dapper/amd64/nm-applet/0.5.1-0ubuntu19

powerpc

https://launchpad.net/ubuntu/dapper/powerpc/network-manager/0.5.1-0ubuntu19 https://launchpad.net/ubuntu/dapper/powerpc/nm-applet/0.5.1-0ubuntu19 these can be installed by double clicking, or using dpkg -i packagename.deb

Disabling NetworkManager

According to this bug here's how to disable Network Manager without uninstalling it: Stop network manager

sudo /etc/dbus-1/event.d/26NetworkManagerDispatcher stop
sudo /etc/dbus-1/event.d/25NetworkManager stop

Create two files with only the word 'exit' in them. These files are:

/etc/default/NetworkManager
/etc/default/NetworkManagerDispatcher

Advanced Network Troubleshooting in GConf

Navigating gconf-editor

Once you have connected to a network, even unintentionally, it's configuration details will have been stored in the GConf registry. This means that Network Manager will automatically reconnect to any network it finds nearby that is stored in GConf. The order of preference is based on the time you last connected. To access these details open gconf-editor.

gconf-editor

Now navigate to system -> networking -> wireless -> networks. There you will find separate directories for each network under it's network name (essid).

Preventing automatic connection to particular networks

In gconf-editor select the essid of the network you wish to edit. For each of the keys, right-click the key and select Unset Key... Once done quit gconf-editor. If you reopen gconf-editor, you will now see that the network has been removed. This will only prevent automatic connection to a network, you can manually re-connect at any time.

Ensuring connection to particular access points

In gconf-editor select the essid of the network you wish to edit. Right-click on the bssids key and choose Edit Key... Remove the bssid values of the access points that you do not wish to connect to, leaving the ones that you do wish to connect to. Click OK and then quit Gconf-editor. For further information see the Network Manager FAQ

User comments

1) An interesting thing happens if you combine Network Manager with UbuntuHelp:Wifidocs/Driver/Ndiswrapper. Since the command "ndiswrapper -m" only creates an alias, eg. "alias wlan0 ndiswrapper", the module will only be loaded when the interface wlan0 is used. But since Network Manager requires an empty interfaces list, ndiswrapper never gets loaded. A possible fix is to add a line "ndiswrapper" to /etc/modules. I hope this is the right place for this comment, YungChinOei 2) If you get the error.. "The Network``Manager applet could not find some required resources. It cannot continue." Open up a terminal & type in .. sudo gtk-update-icon-cache -f /usr/share/icons/hicolor/ I've only come across this error once, & this fixed it straight up :D 3) I have problems connecting to a hidden access point. Switching the SSID broadcast on solves the problem, but it's a security issue. Try going to "connect to another network" or something like that in the applet menu, then enter the SSID. It won't work, at least not for me. Please have a look at this bug. This bug is open for quite a long time, and it seems it is caused by a mismatch between Wireless Tools and Wireless Extensions of the kernel. I get the following: iwconfig --version iwconfig Wireless-Tools version 29 Compatible with Wireless Extension v11 to v21. Kernel Currently compiled with Wireless Extension v22. ath0 Recommended Wireless Extension v13 or later, Currently compiled with Wireless Extension v22 -- Ubuntu:PeterWhittaker, 20070326: Cloaking the SSID serves little purpose because it is easily discoverable: Anyone who wants to access your network illicitly will be able to discover your SSID using commonly available tools, with minimum effort. While an SSID is not quite analogous to an IP address, the analogy is good: The SSID appears outside the security envelope in communications between the client and the access point. If you are concerned with security, use WPA, preferably WPA2 (RSN), with a strong cipher (AES). I would argue that SSID cloaking capabilities are a hold-over hack from the "bad old days" of WEP, when there was no effective wireless security and people were scrambling to at least achieve the "appearance" of security (while doing very little to become secure). 4) I could not connect to a Windows VPN (PPTP) unless I manually set the MTU and MRU to 1500. No error message other than "Could not connect" was reported. So try this easy change if you can't connect. 5) I'd love to be able to set manually an ip for a given ESSID, but still autodetect other networks while I move.