|
|
我们学校用的是港湾网络的8012x认证上网,但没有Linux版的
我原以为不得不放弃linux了,因为我用的是debian,不上网就没啥用了
学校是从来不在意学生的感受的,linux客户端肯定要等到猴年马月才出来
我在网上看见有人同样是港湾网络,用xsupplicant实现上网了,很是高兴
但自己试却没成功
我的系统是Debian ,kernel 2.6.8
安装xsupplicant1.0.1 成功
可以确定港湾网络用的是MD5-Challenge的身份验证,认证触发为广播
上网帐号:
user:21311033
password: 123456
xsupplicant.conf如下:
- # This is an example configuration file for xsupplicant versions after 0.8b.
- ##########################################################################
- # GLOBAL SECTION #
- ##########################################################################
- # List of configured networks to keep in memory, expressed as a comma
- # seperated list or the keyword 'all'. For efficiency, keep only the
- # networks you use in this list and make sure that it includes your
- # default network.
- #network_list = default, test1, test2
- network_list = all
- # Default network name to use when there is not an explicit match
- #default_netname = my_defaults
- default_netname = default
- # When using the startup_command, first_auth_command, and reauth_command
- # directives, "%i" will be expanded to the interface name. This allows a
- # single network profile to work across different interfaces.
- # The command to run when xsupplicant is first started.
- startup_command = <BEGIN_COMMAND>echo "xsupplicant startup"<END_COMMAND>
- # The command to run when xsupplicant authenticates to a network for the
- # first time. This will usually be used to start a DHCP client process.
- first_auth_command = <BEGIN_COMMAND>dhclient %i<END_COMMAND>
- # The command to run when xsupplicant reauthenticates to a network.
- reauth_command = <BEGIN_COMMAND>echo "reauthenticated %i"<END_COMMAND>
- # Where the supplicant should log to, (xsupplicant will create a new log
- # file on each invocation).
- logfile = /var/log/xsupplicant.log
- # The auth_period, held_period, and max_starts directives 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
- # For most people, the default setting for "allmulti" will work just fine.
- # In some cases however 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
- # Defining an interface in "allow_interfaces" will bypass the rules that
- # xsupplicant uses to determine if an interface is valid. For most people
- # this setting shouldn't be needed. It is useful for having xsupplicant
- # attempt to authenticate on interfaces that don't appear to be true
- # physical interfaces, (i.e. virtual interfaces such as eth0:1).
- #allow_interfaces = eth0, wlan0
- # Defining an interface in "deny_interfaces" will prevent xsupplicant from
- # attempting to authenticate on a given interface. This is useful if you
- # know that you will never do 802.1x on a specific interface. However,
- # allows will take priority over denies, so defining the same interface in
- # the allow_interfaces, and deny_interfaces will result in the interface
- # being used.
- #deny_interfaces = eth1
- ##########################################################################
- # 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, '-',
- # '_', '\', and '/'. 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.
- ## The default network is not a network itself. These values are the
- ## default used for any network parameters not overridden in another
- ## section. If it's not in your network configuration and not in your
- ## default, it won't work!!
- default
- {
- # The type of this network. wired or wireless, if this value is not set,
- # xsupplicant will attempt to determine if the interface is wired or
- # wireless. In general, you should only need to define this when
- # xsupplicant incorrectly identifies your network interface.
- #type = wireless
- # If this profile is forced to wired, this will not do anything.
- # However, if the interface is forced, or detected to be wireless
- # xsupplicant will take control of re/setting WEP keys when the machine
- # first starts, and when it jumps to a different AP. In general, you
- # won't need to define, or set this value.
- #wireless_control = yes
- # Describes which EAP types this network will allow. The first type
- # listed will be requested if the server tries to use something not in
- # this list.
- #allow_types = eap_tls, eap_md5, eap_gtc, eap-otp
- allow_types = eap_md5
- # What to respond with when presented with an EAP Id Request. Typically,
- # this is the username for this network. Since this can be an arbitrary
- # string, enclose within <BEGIN_ID> and <END_ID>
- identity = <BEGIN_ID>21311033<END_ID>
- # Force xsupplicant to send it's packets to this destination MAC address.
- # In most cases, this isn't needed, and shouldn't be defined.
- #dest_mac = 00:aA:bB:cC:dD:eE
- ## Method-specific parameters are kept in the method
-
- eap-md5 {
- username = <BEGIN_UNAME>21311033<END_UNAME>
- password = <BEGIN_PASS>123456<END_PASS>
- }
-
- }
复制代码
上面代码中其实还有几个其他认证方式的函数被我删掉了,只留了 eap-md5
运行xsupplicant时的问题:
root@0[root]# xsupplicant -i eth0
Using default config!
network_list: all
Default network: "default"
Startup command: "echo "xsupplicant startup""
First_Auth command: "dhclient %i"
Reauth command: "echo "reauthenticated %i""
Logfile: "/var/log/xsupplicant.log"
Allow Type: MD5
ID: "21311033"
md5 username: "21311033"
md5 password: "123456"
"xsupplicant startup"
停在这里就不动了
xsupplicant.log中的信息:
Interface initalized!
No configuration information for network "(null)" found. Using default.
There was no active method in eap_cleanup()!
如有情况相似而又成功在linux下上网的兄弟一定要不吝赐教
最好能贴一下你们的配置文件 |
|