最近刚装上Win10+Ubuntu16.04双系统,但是被锐捷校园网问题折腾了好久,一开始不能认证,后来认证成功但上不去网。
我把锐捷文件夹放在/home主目录下,进入主目录
cd ~/
以管理员身份运行rjsupplicant.sh脚本
sudo ./rjsupplicant.sh -u 1111111 -p 2222222 -d 1
-u后面是自己的用户名,-p是密码。这时发现有点电脑不能认证成功,而且发现电脑的网络服务也关闭了。这时因为网卡mac地址与系统不兼容,而且rjsupplicant.sh脚本文件关闭了其他服务。
现在看一下rjsupplicant.sh有哪些参数:
sudo ./rjsupplicant.sh -h
$ sudo ./rjsupplicant.sh -h
[sudo] password for luchao:
rjsupplicant - usage-a --auth authenticate mode (with parameter[0/1], 0 means "wireless", 1 means "wired". default take last authmode or "wired" without this option)-d --dhcp dhcp(with parameter[0/1], 0 means using system interfaceconfig, 1 means get ip by dhcp server; take last configwithout this option)-n --nic nic (with parameter[eg. eth0, detail for "-l"], default take last nic or first nic without this option)-s --service service (with parameter["servicename", detail for "-l"],default take last service name or first service name without this option)-I --ssid wireless ssid (with parameter["ssid", detail for "-l"], only for wirless auth mode. default take last ssid or first ssid without this option)-w --wlan scan wireless network: without parameter, take "-n" option to show wireless ssid by the specific nic-u --user user name (with parameter[detail for "-l"], default takelast user name without this option)-p --password password (with parameter, it can be seted after running if without password, default is null unless save password before)-S --save save password (with parameter[0/1], 0 means not save, 1 means save, default take last config without this option)-q --quit quit program(without parameter,take this option(-q) to quit the program)-l --list list information: without parameter, only show config with this option, sush as version, authmode, nic, service[option], user, service list[opt], nic list. this commanddefault to list current authentication information)--comments run as daemon,run log in "/home/luchao/rjsupplicant/x64/log/run.log".
这里列出来几个常用的参数:-u 用户名,-p 密码,-d 1自动获取网络连接方式,-n 网卡名称。
言归正传,现在提出我的解决方式:
查看自己的网卡名称
ifconfig
第一个就是网卡名称(这里说的不太准确,但是懂这个意思就行啊),一般的电脑都是都是eth0,但是我的电脑是enp5s0f1。
第二步:
sudo ./rjsupplicant.sh -a 1 -d 1 -n enp5s0f1 -u 用户名 -d 密码
这时候应该可以认证成功,然后注销电脑,如果不能联网就重启一下,如果还不能联网接着往下看:
打开电脑设置里的NetWork,如果提示兼容性问题,则进入一下我文件夹:
cd /etc/NetworkManager/system-connections/
把这里的文件全部删除掉,然后执行连接命令:
sudo ./rjsupplicant.sh -a 1 -d 1 -n enp5s0f1 -u 用户名 -d 密码
这时候重启电脑就可以啦!以后再联网时候只需要一下代码就可以了:
sudo ./rjsupplicant.sh -u 用户名 -d 密码