|
在安装软件之前,先进入windows连接上校园网,在不断开连接的情况下重新启动电脑进入ubuntu,这样你就有一个小时的上网时间。也就是说,服务器一个小时后才会发现你没有使用客户端,从而断开你的网络。让ubuntu连上网络能更好的安装软件。 打开终端,输入命令:
sudo apt-get install openssl 如果提示已是最新版本就不理它了,因为我不记得ubuntu 7.10是否默认安装这个软件了 安装xsupplicant,输入命令:
sudo apt-get install xsupplicant 安装完后编辑它的配置文件,编辑之前,最好备份一下:
sudo cp /etc/xsupplicant/xsupplicant.conf /etc/xsupplicant/xsupplicant_bk.txt 备份好了开始编辑:
sudo gedit /etc/xsupplicant/xsupplicant.conf 把现有的内容替代成下面的内容:
# This is an example configuration file for xsupplicant versions after 0.8b.
### GLOBAL SECTION
# network_list: defines all of the networks in this file which # should be kept in memory and used.Comma delimited list or "all" # for keeping all defined configurations in memory. For efficiency, # keep only the networks you might roam to in memory. # To avoid errors, make sure your default network is always # in the network_list. In general, you will want to leave this set to # "all".
network_list = all #network_list = default, test1, test2
# default_netname: some users may actually have a network named "default". # since "default" is a keyword in the network section below, you can # change which is to be used as the replacement for this keyword # # As of Xsupplicant 1.2.2, wireless interfaces will no longer use the default # network name if they are unable to find a valid config. If you have # auto association turned on, Xsupplicant will find a new network to connect # to. Otherwise, it will do nothing.
default_netname = default #default_netname = my_defaults
# destination: defines how Xsupplicant should determine the destination address # that should be used for the 802.1X conversation. # # Valid Options are : # Auto - respond to source address from the last packet we saw. # Source - same as Auto # BSSID - Always answer to the BSSID of the AP we are associated to. # Multicast - always use the multicast address defined in 802.1X-2001. # #destination = auto
# Do we want xsupplicant to pick the best AP to connect to? Or should the # 'firmware' be allowed to select the AP? (In most cases, letting Xsupplicant # make the decision for you is currently better.) #roaming = xsupplicant
# Should we do passive scanning while associated/authenticated with an AP? # In order to support preauthentication, this *MUST* be enabled. However, # some wireless cards don't do passive scanning correctly, and will end up # disconnecting you from the network while a scan is completed. #passive_scanning = yes
# The amount of time (in seconds) that should pass between passive scan # attempts. When the scan is commplete, Xsupplicant will make a decision # about which AP is the best. If a better AP is found, Xsupplicant will # jump to it. If 'passive_scanning' is set to 'no', then this setting does # nothing. #passive_timer = 300
# EAP request identity messages may contain a network id field in it. This # network ID can be useful for determining a network name on wired networks. # For wireless networks, this ID usually matches the SSID so leaving it # enabled is a good idea unless you have a reason not to. # use_eap_hints = yes
# When running in daemon, or non-foreground mode, you may want to have the # output of the program. So, define a log file here. Each time XSupplicant # is started, this file will be replaced. So, there is no need to roll the # log file. If the logfile name is set to "syslog", then all messages will # be sent to the syslog. If syslog is defined, you should also define # "log_facility" to specify which logging facility will be used. #logfile = /data/xsupplicant.log
# If you have set the logfile option to "syslog", then you should define # log_facility in order to tell Xsupplicant where to send log messages. # Valid settings are cron, daemon, ftp, kern, local0, local1, local2, # local3, local4, local5, local6, local7, lpr, news, user, and uucp # log_facility = daemon
# If we want Xsupplicant to control the associations for networks, we need # to set the following setting to "auto". If you want to control the network # you connect to via iwconfig (or other SSID setting utility) you should set # this option to manual. The default is auto. #association = auto
# This value should be changed to reflect how long it takes your card to # determine if it is associated. (Basically, the value should be the number # of seconds it takes for your card to scan every possible frequency and # speed it is aware of.) For most cards, 30 seconds is enough time. However # if your card is capable of doing 802.11a/b/g, you may need to set this # value higher.
#association_timeout = 30
# The auth_period, held_period, and max_starts modify the timers in the state # machine. (Please reference the 802.1x spec for info on how they are used.) # For most people, there is no reason to define these values, as the defaults # should work.
#auth_period = 30
#held_period = 30
#max_starts = 3
# The "default_interface" is the interface that will be used if one is not # specified on the command line.
#default_interface = eth1
# Enable or disable friendly warnings. The default setting is "yes".
# friendly_warnings = no
# The stale key timeout is how long a unicast key should be in use before a # warning is issued. It doesn't actually change the way the program functions # and should be considered cosmetic. However, it may be useful to put this # to a lower value if you believe that WEP keys can be broken quicker than the # default setting of 10 minutes. If friendly_warnings is set to no, then # this does nothing.
#stale_key_timeout = 600
# For most people, the default setting for "allmulti" will work just fine. In # some cases, wireless cards have been known to not work when ALLMULTI is # enabled. (Such as certain Orinoco cards, with older drivers.) If "allmulti" # is set to "no", XSupplicant will not attempt to change the state of the # setting in the driver. So, you should make sure to do an "ifconfig ethX # -allmulti".
#allmulti = no
### NETWORK SECTION # The general format of the network section is a network name followed # by a group of variables.
# Network names may contain the following characters: a-z, A-Z, 0-9, '-', # '_', '\', '/' # Those interested in having an SSID with ANY character in it can use # the ssid tag within the network clause. Otherwise, your ssid will # be the name of the network.
## Default Network Section # This is the network configuration that will be used in the event that # no valid network configuration can be found. If you are going to leave # Xsupplicant running all the time, it is recommended that you leave this # section blank. A blank network definition will result in Xsupplicant # turning off encryption and turning control over to iwconfig. default {type=wired allow_types = eap-md5 identity = "YOUR_ID" # Replace your account name. eap-md5 { username = "YOUR_ID" # Replace your account name again password = "YOUR_PASSWORD" # If the password has spaces, quote it. } }
把YOUR_ID,YOUR_PASSWORD换成自己的帐号和密码,保存后退出
开启xsupplicant
sudo gedit /etc/default/xsupplicant 把里面的ENABLE的值设为1
ENABLE = 1 保存后退出 每次联网的时候,用如下命令:
sudo xsupplicant -i eth0
GOOD LUCK! 有什么问题,请发邮件到
|
一共有 0 条评论