LinuxSir.cn,穿越时空的Linuxsir!

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

fc6下xsupplicant配置求助

[复制链接]
发表于 2007-4-18 18:36:46 | 显示全部楼层 |阅读模式
我所在的学校网络使用安腾认证收费系统(用户机使用固定IP-----公网IP,并与MAC地址绑定),认证应用程序名为eflow.exe,在winxp下的系统托盘中显示为suppliacnt1.2.4,同时,在本地连接属性的验证选项卡中已显示   启用此网络的802.1x验证,eap类型为智能卡或其它证书,证书颁发者为  ABA.ECOM Root CA
我在fc6下安装了xsupplicant-1.2.8-1.fc6.1.i386.rpm,按照从网上找到的配置方法进行配置,但不成功。(配置文件在/etc中)
&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
方法1:
在default中加入:

  allow_types = all
  identity = yourid
  eap-md5 {
        username = testuser
        password = "test user pass!"   # Since the password has spaces, quote it.
  }

  3、把eap-md5部分中的username password的值改成你的用户名密码。

  4、执行以下命令:

  #/usr/local/sbin/xsupplicant -i eth0
  #/sbin/dhclient eth0(可能之前要killall dhclient)

  至此已正式通过802.1x认证,可以正常上网了。
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
该方法的第四步无法完成,系统提示找不到目录,跳过这一步,系统又会提示配置错误:
[root@localhost ~]# xsupplicant -i eth0
Starting XSupplicant v. 1.2.8
  =Error in configuration, at line 163:
syntax error:

  identity =username
            ^
General Parse error!
There was a problem with the config file.  We cannot continue.


&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&


方法2:
1 找到 identity = <BEGIN_ID>myid@mynet.net<END_ID> 这一行

myid@mynet.net 改成你的用户名

2、 找到

eap-md5 {

username = <BEGIN_UNAME>testuser<END_UNAME>

password = <BEGIN_PASS>testuserpass!<END_PASS>

}


分别把testuser和testuserpass! 字段改成你的用户名和密码

3、把这个配置cp到 /etc下,以后xspplicant运行时会首先调用这个配置文件

4、当然如果你不嫌麻烦,也可以把

allow_types = all

这一行把all换成更具体的验证方式(校园网用的是eap_md5),不改也没关系:)这三步搞掂,接下来的任务就轻松啦...


四、最后一步:打开shell,输入xsupplicant -i eth0 (如果是有其他网卡就选择具体的ethX),如果出现以下提示:

[root@localhost ~]# xsupplicant -i eth0

Using default config!

"some command"

Internet Systems Consortium DHCP Client V3.0.1

Copyright 2004 Internet Systems Consortium.

All rights reserved.

For info, please visit http://www.isc.org/products/DHCP

sit0: unknown hardware address type 776

sit0: unknown hardware address type 776

Listening on LPF/eth0/00:11:2f:cc:52:4e

Sending on LPF/eth0/00:11:2f:cc:52:4e

Sending on Socket/fallback

DHCPREQUEST on eth0 to 255.255.255.255 port 67

DHCPACK from 218.192.*.1

SIOCADDRT: 文件已存在

bound to 218.192.*.* -- renewal in 1479 seconds


其中 218.192.*.1和218.192.*.*分别是网关和本机获得的IP,说明认证通过,恭喜恭喜!

下一步..哈哈,还用我说吗?just enjoy yourself!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
该方法也没有成功,错误提示如下:
[root@localhost ~]# xsupplicant -i eth0
Starting XSupplicant v. 1.2.8
Error in configuration, at line 289:
syntax error:

      password =123456  # Since the password has spaces, quote it.
               ^
General Parse error!
*** glibc detected *** xsupplicant: double free or corruption (fasttop): 0x08744308 ***
======= Backtrace: =========
/lib/libc.so.6[0x658efd]
/lib/libc.so.6(cfree+0x90)[0x65c550]
xsupplicant[0x80784a0]
xsupplicant[0x8078608]
xsupplicant[0x807866e]
xsupplicant[0x80793df]
xsupplicant[0x807ab04]
xsupplicant[0x8078c4b]
xsupplicant[0x8078cdf]
xsupplicant[0x804aad7]
xsupplicant[0x804b495]
/lib/libc.so.6(__libc_start_main+0xdc)[0x608f2c]
xsupplicant[0x804a611]
======= Memory map: ========
004fc000-004fe000 r-xp 00000000 03:08 391594     /lib/libcom_err.so.2.1
004fe000-004ff000 rwxp 00001000 03:08 391594     /lib/libcom_err.so.2.1
00501000-00508000 r-xp 00000000 03:08 1469892    /usr/lib/libkrb5support.so.0.1
00508000-00509000 rwxp 00006000 03:08 1469892    /usr/lib/libkrb5support.so.0.1
0050b000-00530000 r-xp 00000000 03:08 1469893    /usr/lib/libk5crypto.so.3.0
00530000-00531000 rwxp 00025000 03:08 1469893    /usr/lib/libk5crypto.so.3.0
00557000-00566000 r-xp 00000000 03:08 391593     /lib/libresolv-2.5.so
00566000-00567000 r-xp 0000e000 03:08 391593     /lib/libresolv-2.5.so
00567000-00568000 rwxp 0000f000 03:08 391593     /lib/libresolv-2.5.so
00568000-0056a000 rwxp 00568000 00:00 0
0056c000-00596000 r-xp 00000000 03:08 1525557    /usr/lib/libgssapi_krb5.so.2.2
00596000-00597000 rwxp 00029000 03:08 1525557    /usr/lib/libgssapi_krb5.so.2.2
005d6000-005ef000 r-xp 00000000 03:08 391573     /lib/ld-2.5.so
005ef000-005f0000 r-xp 00018000 03:08 391573     /lib/ld-2.5.so
005f0000-005f1000 rwxp 00019000 03:08 391573     /lib/ld-2.5.so
005f3000-0072a000 r-xp 00000000 03:08 391574     /lib/libc-2.5.so
0072a000-0072c000 r-xp 00137000 03:08 391574     /lib/libc-2.5.so
0072c000-0072d000 rwxp 00139000 03:08 391574     /lib/libc-2.5.so
0072d000-00730000 rwxp 0072d000 00:00 0
00732000-00757000 r-xp 00000000 03:08 391581     /lib/libm-2.5.so
00757000-00758000 r-xp 00024000 03:08 391581     /lib/libm-2.5.so
00758000-00759000 rwxp 00025000 03:08 391581     /lib/libm-2.5.so
0075b000-0075d000 r-xp 00000000 03:08 391575     /lib/libdl-2.5.so
0075d000-0075e000 r-xp 00001000 03:08 391575     /lib/libdl-2.5.so
0075e000-0075f000 rwxp 00002000 03:08 391575     /lib/libdl-2.5.so
0077a000-0078c000 r-xp 00000000 03:08 1469834    /usr/lib/libz.so.1.2.3
0078c000-0078d000 rwxp 00011000 03:08 1469834    /usr/lib/libz.so.1.2.3
009c7000-009c8000 r-xp 009c7000 00:00 0          [vdso]
009d9000-009e4000 r-xp 00000000 03:08 391583     /lib/libgcc_s-4.1.1-20061011.so.1
009e4000-009e5000 rwxp 0000a000 03:08 391583     /lib/libgcc_s-4.1.1-20061011.so.1
00c25000-00c2c000 r-xp 00000000 03:08 391545     /lib/libiw.so.28
00c2c000-00c2d000 rwxp 00006000 03:08 391545     /lib/libiw.so.28
0617a000-061ff000 r-xp 00000000 03:08 1469894    /usr/lib/libkrb5.so.3.2
061ff000-06201000 rwxp 00084000 03:08 1469894    /usr/lib/libkrb5.so.3.2
06203000-0631f000 r-xp 00000000 03:08 391595     /lib/libcrypto.so.0.9.8b
0631f000-06331000 rwxp 0011c000 03:08 391595     /lib/libcrypto.so.0.9.8b
06331000-06335000 rwxp 06331000 00:00 0
06337000-06378000 r-xp 00000000 03:08 391596     /lib/libssl.so.0.9.8b
06378000-0637c000 rwxp 00040000 03:08 391596     /lib/libssl.so.0.9.8b
08048000-0809c000 r-xp 00000000 03:08 446053     /usr/sbin/xsupplicant
0809c000-0809d000 rw-p 00053000 03:08 446053     /usr/sbin/xsupplicant
08740000-08761000 rw-p 08740000 00:00 0
b7e00000-b7e21000 rw-p b7e00000 00:00 0
b7e21000-b7f00000 ---p b7e21000 00:00 0
b7f40000-b7f44000 rw-p b7f40000 00:00 0
b7f5b000-b7f5e000 rw-p b7f5b000 00:00 0
bfd4e000-bfd63000 rw-p bfd4e000 00:00 0          [stack]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
这2中方法所使用的xsupplicant版本为1.0左右,有一些我没有全照着做。现在我也不知道问题出在哪里,想问问有没有人知道。
发表于 2007-4-19 22:52:35 | 显示全部楼层
你试试下面这个,是xsupplicant-1.2.8的设置:

######################
# 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

# When Xsupplicant initiates a scan, it will wait for some amount of time
# before it attempts another scan.  (This is to avoid hammering on the card
# to find an AP.)  Depending on your driver, this setting may need to be
# changed.  Specifically, for Atheros a/b/g devices it is probably better
# to set this to 30.
#scan_timeout = 15

# Xsupplicant will create a control socket that can be used for various
# gui interface programs.  In order to be able to use those programs as a
# user other than root, we need to set the socket to be owned by a specific
# group.  The 'ipc_group' command allows you to do this.  By default, it is
# owned by root.  It is suggested that you set it to users if you plan to
# use the control socket.
#ipc_group = users

# 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 = /var/log/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 account name" # Replace your account name.
         eap-md5 {
                      username = "Your account name" # Replace your account name again
                      password = "Your password"   # If the password has spaces, quote it.
                }
}


###EOF
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-20 22:07:21 | 显示全部楼层

我太笨了,没弄成

我不太懂这是怎么配置的,就照着把用户名和密码改了一下。在终端下:
xsupplicant -i eth0
starting xsupplicant1.2.8
之后就没有任何提示了,终端回到了提示符下。系统监视器显示它已启动,间歇性的运行,但还是不能通过认证,会不会是因为认证使用了证书的缘故。另外我在xsupplicant的原始配置文件当中看到wep key,网上不少人说它是使用无线网时用的,我现在使用的是LAN(之前没说清楚,抱歉),这个对认证有影响吗?有谁知道还有没有其它的用于局域网802.1x认证的工具(网上最多的就是有关实达和锐杰的,感觉好像不能用,因为它们的背景)。谢谢acevery的回复。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-4-20 22:08:56 | 显示全部楼层

我太笨了,没弄成

帖子重复,内容已删除.
回复 支持 反对

使用道具 举报

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

本版积分规则

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