LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 982|回复: 4

linux认证上网问题,整个学校的linux都上不了网,好郁闷阿

[复制链接]
发表于 2005-4-26 22:19:14 | 显示全部楼层 |阅读模式
我们学校用的是港湾网络的8012x认证上网,但没有Linux版的
我原以为不得不放弃linux了,因为我用的是debian,不上网就没啥用了
学校是从来不在意学生的感受的,linux客户端肯定要等到猴年马月才出来
我在网上看见有人同样是港湾网络,用xsupplicant实现上网了,很是高兴
但自己试却没成功
我的系统是Debian ,kernel 2.6.8
安装xsupplicant1.0.1 成功
可以确定港湾网络用的是MD5-Challenge的身份验证,认证触发为广播
上网帐号:
user:21311033
password: 123456
xsupplicant.conf如下:

  1. # This is an example configuration file for xsupplicant versions after 0.8b.

  2. ##########################################################################
  3. #                              GLOBAL SECTION                            #
  4. ##########################################################################

  5. # List of configured networks to keep in memory, expressed as a comma
  6. # seperated list or the keyword 'all'. For efficiency, keep only the
  7. # networks you use in this list and make sure that it includes your
  8. # default network.

  9. #network_list = default, test1, test2
  10. network_list = all

  11. # Default network name to use when there is not an explicit match

  12. #default_netname = my_defaults
  13. default_netname = default

  14. # When using the startup_command, first_auth_command, and reauth_command
  15. # directives, "%i" will be expanded to the interface name. This allows a
  16. # single network profile to work across different interfaces.

  17. # The command to run when xsupplicant is first started.

  18. startup_command = <BEGIN_COMMAND>echo "xsupplicant startup"<END_COMMAND>

  19. # The command to run when xsupplicant authenticates to a network for the
  20. # first time.  This will usually be used to start a DHCP client process.

  21. first_auth_command = <BEGIN_COMMAND>dhclient %i<END_COMMAND>

  22. # The command to run when xsupplicant reauthenticates to a network.

  23. reauth_command = <BEGIN_COMMAND>echo "reauthenticated %i"<END_COMMAND>

  24. # Where the supplicant should log to, (xsupplicant will create a new log
  25. # file on each invocation).
  26. logfile = /var/log/xsupplicant.log

  27. # The auth_period, held_period, and max_starts directives modify the
  28. # timers in the state machine. (Please reference the 802.1x spec for info
  29. # on how they are used.) For most people, there is no reason to define
  30. # these values, as the defaults should work.

  31. #auth_period = 30
  32. #held_period = 30
  33. #max_starts = 3

  34. # For most people, the default setting for "allmulti" will work just fine.  
  35. # In some cases however wireless cards have been known to not work when
  36. # ALLMULTI is enabled, (such as certain Orinoco cards with older drivers).
  37. # If allmulti is set to no, xsupplicant will not attempt to change the state
  38. # of the setting in the driver so you should make sure to do an "ifconfig
  39. # ethX -allmulti".

  40. #allmulti = no

  41. # Defining an interface in "allow_interfaces" will bypass the rules that
  42. # xsupplicant uses to determine if an interface is valid.  For most people
  43. # this setting shouldn't be needed.  It is useful for having xsupplicant
  44. # attempt to authenticate on interfaces that don't appear to be true
  45. # physical interfaces, (i.e. virtual interfaces such as eth0:1).

  46. #allow_interfaces = eth0, wlan0

  47. # Defining an interface in "deny_interfaces" will prevent xsupplicant from
  48. # attempting to authenticate on a given interface.  This is useful if you
  49. # know that you will never do 802.1x on a specific interface.  However,
  50. # allows will take priority over denies, so defining the same interface in
  51. # the allow_interfaces, and deny_interfaces will result in the interface
  52. # being used.

  53. #deny_interfaces = eth1

  54. ##########################################################################
  55. #                             NETWORK SECTION                            #
  56. ##########################################################################

  57. # the general format of the network section is a network name followed
  58. # by a group of variables

  59. # network names may contain the following characters: a-z, A-Z, 0-9, '-',
  60. # '_', '\', and '/'. Those interested in having an SSID with ANY character
  61. # in it can use the ssid tag within the network clause. Otherwise, your
  62. # ssid will be the name of the network.

  63. ## The default network is not a network itself. These values are the
  64. ## default used for any network parameters not overridden in another
  65. ## section. If it's not in your network configuration and not in your
  66. ## default, it won't work!!

  67. default  
  68. {
  69.   # The type of this network. wired or wireless, if this value is not set,
  70.   # xsupplicant will attempt to determine if the interface is wired or
  71.   # wireless.  In general, you should only need to define this when
  72.   # xsupplicant incorrectly identifies your network interface.
  73.   #type = wireless

  74.   # If this profile is forced to wired, this will not do anything.
  75.   # However, if the interface is forced, or detected to be wireless
  76.   # xsupplicant will take control of re/setting WEP keys when the machine
  77.   # first starts, and when it jumps to a different AP.  In general, you
  78.   # won't need to define, or set this value.
  79.   #wireless_control = yes

  80.   # Describes which EAP types this network will allow. The first type
  81.   # listed will be requested if the server tries to use something not in
  82.   # this list.
  83.   #allow_types = eap_tls, eap_md5, eap_gtc, eap-otp
  84.   allow_types = eap_md5

  85.   # What to respond with when presented with an EAP Id Request. Typically,
  86.   # this is the username for this network. Since this can be an arbitrary
  87.   # string, enclose within <BEGIN_ID> and <END_ID>
  88.   identity = <BEGIN_ID>21311033<END_ID>

  89.   # Force xsupplicant to send it's packets to this destination MAC address.
  90.   # In most cases, this isn't needed, and shouldn't be defined.
  91.   #dest_mac = 00:aA:bB:cC:dD:eE

  92.   ## Method-specific parameters are kept in the method


  93.   eap-md5 {
  94.       username = <BEGIN_UNAME>21311033<END_UNAME>
  95.       password = <BEGIN_PASS>123456<END_PASS>
  96.   }

  97.   
  98. }


复制代码


上面代码中其实还有几个其他认证方式的函数被我删掉了,只留了 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下上网的兄弟一定要不吝赐教
最好能贴一下你们的配置文件
发表于 2005-4-26 22:24:31 | 显示全部楼层
我们这里宿舍是赛尔的,到现在还没有搞定呢!虽然都是802.1……
回复 支持 反对

使用道具 举报

 楼主| 发表于 2005-4-27 06:24:35 | 显示全部楼层
我觉得港湾用的应该是标准的8012x协议
因为学校里有人用苹果机自带的连接软件上网了
不过似乎那个软件不能在linux下安装
回复 支持 反对

使用道具 举报

发表于 2005-4-27 08:40:16 | 显示全部楼层
回复 支持 反对

使用道具 举报

发表于 2005-4-27 10:00:23 | 显示全部楼层
可以用代理啊!sygate ccproxy都可以的
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表