网上找不到,xrgsu动态认证怎样编脚本开机自动启动

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
回复
我是一只菜菜鸟
帖子: 167
注册时间: 2009-08-19 8:27

网上找不到,xrgsu动态认证怎样编脚本开机自动启动

#1

帖子 我是一只菜菜鸟 » 2009-09-16 23:25

我是用xrgsu动态认证的,这是我的认证过程

代码: 全选

xxx@xxx-desktop:~$ sudo su 
[sudo] password for xxx: 
root@xxx-desktop:/home/xxx# ifconfig eth0 222.17.xxx.xxx
root@xxx-desktop:/home/xxx# xrgsu -d
XRGSupplicant 1.1.1
Ruijie Network CopyRight 2004-2005
Please input your user name:xxxxx
Please input your password:
Use default auth parameter,0-Use 1-UnUse(Default: 0):
Searching server...
Connecting server...
Authenticating...

07������ϵ�г�Ӫ�����
��֤�ɹ���

Authenticate SUCCESSFULLY!
eth0: 没有进程被杀死
There is already a pid file /var/run/dhclient.pid with pid 4057
killed old client process, removed PID file
Internet Systems Consortium DHCP Client V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on LPF/eth0/00:e0:61:02:b8:8c
Sending on   LPF/eth0/00:e0:61:02:b8:8c
Sending on   Socket/fallback
DHCPREQUEST of 222.17.xxx.xxx on eth0 to 255.255.255.255 port 67
DHCPREQUEST of 222.17.xxx.xxx on eth0 to 255.255.255.255 port 67
DHCPACK of 222.17.xxx.xxx from 202.192.224.166
bound to 222.17.xxx.xxx-- renewal in 70231 seconds.
Searching server...
Connecting server...
Authenticating...

07������ϵ�г�Ӫ�����
��֤�ɹ���

Authenticate SUCCESSFULLY!
Please input 'unauth' to LogOff:unauth
If system work in DHCP mode,please resume IP address!
xrgsu exit!
root@xxx-desktop:/home/xxx# xrgsu -a
XRGSupplicant 1.1.1
Ruijie Network CopyRight 2004-2005
Please input your user name:xxxx
Please input your password:
Use DHCP,1-Use,0-UnUse(Default: 0):1
Use default auth parameter,0-Use 1-UnUse(Default: 0):
Searching server...
Connecting server...
Authenticating...

07������ϵ�г�Ӫ�����
��֤�ɹ���

Authenticate SUCCESSFULLY!
Please input 'unauth' to LogOff:
我在网上找了一下,,没有用这个认证的,参照了一下,写了个这样的脚本:
#!/usr/bin/expect
set timeout 10
spawn sudo su
expect "[sudo] password for xxx:"
send "xxx\r"
spawn ifconfig eth0 222.17.xxx.xxx
spawn xrgsu -d
expect "Please input your user name:"
send "xxx\r"
expect "Please input your password:"
send "xxx\r"
expect "Use default auth parameter,0-Use 1-UnUse(Default: 0):"
send "\r"
expect "Please input 'unauth' to LogOff:"
send "unauth\r"
spawn xrgsu -a
expect "Please input your user name:"
send "xxx\r"
expect "Please input your password:"
send "xxx\r"
expect "Use DHCP,1-Use,0-UnUse(Default: 0):"
send "1\r"
expect "Use default auth parameter,0-Use 1-UnUse(Default: 0):"
send "\r"
expect "Please input 'unauth' to LogOff:"
sleep 360000
#end
但是不行。。。请各位帮下忙
上次由 我是一只菜菜鸟 在 2009-09-17 17:54,总共编辑 4 次。
头像
wowoto
帖子: 3050
注册时间: 2009-04-11 12:17
系统: windows7

Re: 网上找不到,xrgsu动态认证怎样编脚本开机自动启动

#2

帖子 wowoto » 2009-09-17 1:01

那就手动下呗...
wowoto>ubuntu8.04>ubuntu9.04>Archlinux>FreeBSD8.0>Archlinux & end here.
回复