文章列表(关注微信公众号EmulatedLab,及时获取文章以及下载连接)html
一、EVE-NG介绍(EVE-NG最好用的模拟器,仿真环境时代来临!)
mysql
二、EVE-NG安装过程介绍sql
三、EVE-NG导入Dynamips和IOLubuntu
四、EVE-NG导入QEMU镜像服务器
五、EVE-NG关联SecureCRT,VNC,Wireshark微信
六、EVE-NG网卡桥接,带您走进更高级的实验ide
七、EVE-NG硬盘扩容,存储海量镜像测试
八、EVE-NG定制我的镜像,脚本快速导入优化
九、EVE-NG容纳H3C、Huawei,吞并GNS3网站
十、EVE-NG镜像来啦!打造国内最大的EVE交流圈
十一、EVE-NG镜像再次来袭,无所不能!
十二、EVE-NG镜像增持,走上神坛!
1三、EVE-NG内存不够?教您扩大虚拟内存!
1四、EVE-NG更新方便,不费劲儿!
1五、EVE-NG小众镜像,助力尝鲜!
1六、EVE-NG体验Seafile,抛弃10K/s网盘
1七、EVE-NG增添监控服务器镜像,再上新高度!
1八、EVE-NG变身Learning Centre版本及重置Web用户密码
1九、EVE-NG优化非官方支持镜像的接口显示名称
20、......
【EVE-NG变身Learning Centre版本】
看过EVE-NG官网的朋友应该都知道,Learning Center版本对于学校,培训机构来讲很是实用,其中有几个极其重要的Feature。
1、多用户同时登陆进行实验,与其余用户互不影响。
2、每一个用户只能管理本身的实验台。
目前能够经过修改Community版本,简单操做便可变身Learning Centre粗糙版。
注意:请一步一步跟着我作,若有步骤遗漏,可能致使失败。在作以前请作好快照!
1、登陆Web界面,建立用户及拓扑
1、用admin帐户登陆,建立student1和student2用户
2、建立student1和student2用户的拓扑
拓扑目录结构:
student(folder)
--- student1.unl(UNL)
--- student2.unl(UNL)
3、退出admin帐户并关闭全部EVE-NG的Web链接
2、上传脚本并执行,切换到Learning Center版本
在微信公众号中回复Plus,获取脚本
root@eve-ng:~# ls
convert_edition.sh
root@eve-ng:~# source convert_edition.sh
Current Edition: CommunityEdition
Do you want tochange mode ? [Y/N] y
Successfully!!!
Current Edition: LearningCentre Edition
root@eve-ng:~#
3、修改用户默认登陆路径
root@eve-ng:~# mysql -ueve-ng -peve-ng
mysql: [Warning]Using a password on the command line interface can be insecure.
Welcome to the MySQLmonitor. Commands end with ; or \g.
Your MySQLconnection id is 88
Server version:5.7.18-0ubuntu0.16.04.1 (Ubuntu)
Copyright (c) 2000,2017, Oracle and/or its affiliates. All rights reserved.
Oracle is aregistered trademark of Oracle Corporation and/or its
affiliates. Othernames may be trademarks of their respective
owners.
Type 'help;' or '\h'for help. Type '\c' to clear the current input statement.
mysql> use eve_ng_db;
Reading tableinformation for completion of table and column names
You can turn offthis feature to get a quicker startup with -A
Database changed
mysql>
格式:update pods set lab_id='/folder/topology.unl' where username='username';
修改相应内容,本文建立的folder是student,student1的拓扑是student1,那么更改后的命令为
updatepods set lab_id='/student/student1.unl' where username='student1';
以下操做:
mysql> update pods set lab_id='/student/student1.unl' whereusername='student1';
Query OK, 1 rowaffected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> update pods set lab_id='/student/student2.unl' whereusername='student2';
Query OK, 1 rowaffected (0.01 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> quit
root@eve-ng:~#
4、用student1和student2登陆测试
1、用student1用户登陆
直接跳转到拓扑界面,随便加几台设备
而且Close Lab是被禁用的,点击无任何反映
那么该用户就只能操做student1的拓扑
Logout退出
2、用student2登陆
student2的拓扑上什么都没有
Logout退出
3、再次切换到student1用户
两个用户互不影响
Logout退出student1用户
5、切换回Community版本
当须要管理全部用户的拓扑时,须要切换回Community版本。
再次运行脚本切换版本。
root@eve-ng:~# ls
convert_edition.sh
root@eve-ng:~# source convert_edition.sh
Current Edition: LearningCentre Edition
Do you want tochange mode ? [Y/N] y
Successfully!!!
Current Edition: CommunityEdition
root@eve-ng:~#
注意:在切换到Community版本后,千万不要用student用户登陆并Close Lab,这样作会刷新student用户登陆的默认路径。若是路径被刷新,那只能从新操做第三步,再次修改。
在每次切换版本后,F5刷新一下Web。
这时候就能够用admin帐户登陆,管理全部拓扑了。
为了求快,Shell脚本略显粗糙,请见谅!
【EVE-NG重置Web帐户密码】
有的朋友可能会忘记Web密码,这就告诉你们如何重置
重置后的密码为:eve
root@eve-ng:~# mysql -ueve-ng -peve-ng
mysql: [Warning]Using a password on the command line interface can be insecure.
Welcome to the MySQLmonitor. Commands end with ; or \g.
Your MySQLconnection id is 885
Server version:5.7.18-0ubuntu0.16.04.1 (Ubuntu)
Copyright (c) 2000,2017, Oracle and/or its affiliates. All rights reserved.
Oracle is aregistered trademark of Oracle Corporation and/or its
affiliates. Othernames may be trademarks of their respective
owners.
Type 'help;' or '\h'for help. Type '\c' to clear the current input statement.
mysql> use eve_ng_db;
Reading tableinformation for completion of table and column names
You can turn offthis feature to get a quicker startup with -A
Database changed
mysql> update users setpassword='85262adf74518bbb70c7cb94cd6159d91669e5a81edf1efebd543eadbda9fa2b'where username='admin';
Query OK, 0 rowsaffected (0.01 sec)
Rows matched: 1 Changed: 0 Warnings: 0
mysql>
在EVE-NG中,mysql查看的密码是通过sha256哈希计算过的,因此重置密码时要填hash值。这样作不麻烦,能够在Internet网站上在线计算sha256哈希值。固然,也能够不填hash值,这是mysql的内容,就不在这儿介绍了!
本篇于2017-06-04在微信公众号EmulatedLab上发表
Maosen | 森