18.EVE-NG变身Learning Centre版本及重置Web账户密码
admin
2023-04-27 02:40:17
0次


文章列表(关注微信公众号EmulatedLab,及时获取文章以及下载链接)

1、EVE-NG介绍(EVE-NG最好用的模拟器,仿真环境时代来临!)

2、EVE-NG安装过程介绍

3、EVE-NG导入Dynamips和IOL

4、EVE-NG导入QEMU镜像

5、EVE-NG关联SecureCRT,VNC,Wireshark

6、EVE-NG网卡桥接,带您走进更高级的实验

7、EVE-NG硬盘扩容,存储海量镜像

8、EVE-NG定制个人镜像,脚本快速导入

9、EVE-NG容纳H3C、Huawei,吞并GNS3

10、EVE-NG镜像来啦!打造国内最大的EVE交流圈

11、EVE-NG镜像再次来袭,无所不能!

12、EVE-NG镜像增持,走上神坛!

13、EVE-NG内存不够?教您扩大虚拟内存!

14、EVE-NG更新方便,不费劲儿!

15、EVE-NG小众镜像,助力尝鲜!

16、EVE-NG体验Seafile,抛弃10K/s网盘

17、EVE-NG增添监控服务器镜像,再上新高度!

18、EVE-NG变身Learning Centre版本及重置Web用户密码

19、EVE-NG优化非官方支持镜像的接口显示名称

20、......

点击查看配套视频教程!



18.EVE-NG变身Learning Centre版本及重置Web账户密码



【EVE-NG变身Learning Centre版本】

 

 

  看过EVE-NG官网的朋友应该都知道,Learning Center版本对于学校,培训机构来说非常实用,其中有几个极其重要的Feature。

1、多用户同时登录进行实验,与其他用户互不影响。

2、每个用户只能管理自己的实验台。

目前可以通过修改Community版本,简单操作即可变身Learning Centre粗糙版。

 

注意:请一步一步跟着我做,如有步骤遗漏,可能导致失败。在做之前请做好快照!

 

 

一、登录Web界面,创建用户及拓扑

 

1、用admin账户登录,创建student1和student2用户


18.EVE-NG变身Learning Centre版本及重置Web账户密码


2、创建student1和student2用户的拓扑

 

拓扑目录结构:

student(folder)

      --- student1.unl(UNL)

      --- student2.unl(UNL)

 

18.EVE-NG变身Learning Centre版本及重置Web账户密码


18.EVE-NG变身Learning Centre版本及重置Web账户密码


3、退出admin账户并关闭所有EVE-NG的Web连接



二、上传脚本并执行,切换到Learning Center版本

 

在微信公众号中回复Plus,获取脚本


18.EVE-NG变身Learning Centre版本及重置Web账户密码


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


18.EVE-NG变身Learning Centre版本及重置Web账户密码



三、修改用户默认登录路径

 

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

 

 

四、用student1和student2登录测试

 

1、用student1用户登录

18.EVE-NG变身Learning Centre版本及重置Web账户密码

 

直接跳转到拓扑界面,随便加几台设备

18.EVE-NG变身Learning Centre版本及重置Web账户密码


并且Close Lab是被禁用的,点击无任何反映

18.EVE-NG变身Learning Centre版本及重置Web账户密码

 

那么该用户就只能操作student1的拓扑

 

Logout退出

18.EVE-NG变身Learning Centre版本及重置Web账户密码

 

 

2、用student2登录

18.EVE-NG变身Learning Centre版本及重置Web账户密码


 

student2的拓扑上什么都没有

18.EVE-NG变身Learning Centre版本及重置Web账户密码


Logout退出

 

3、再次切换到student1用户

18.EVE-NG变身Learning Centre版本及重置Web账户密码


 

两个用户互不影响

 

Logout退出student1用户

 


五、切换回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:~#


18.EVE-NG变身Learning Centre版本及重置Web账户密码


注意:在切换到Community版本后,千万不要用student用户登录并Close Lab,这样做会刷新student用户登录的默认路径。如果路径被刷新,那只能重新操作第三步,再次修改。

在每次切换版本后,F5刷新一下Web。

 

这时候就可以用admin账户登录,管理所有拓扑了。

18.EVE-NG变身Learning Centre版本及重置Web账户密码


为了求快,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 | 森



相关内容

热门资讯

空调连续工作多久需要停机休息 空调连续工作的时间取决于多个因素,包括空调的型号、功率、使用环境和维护情况等。一般来说,空调可以连续...
空调哪个符号是除湿的 空调除湿功能通常用一个水滴形状的符号表示。不同品牌和型号的空调遥控器可能会有所差异,但一般来说,除湿...
格力空调多长时间加一次氟利昂 1、一般情况下,空调对氟利昂的使用量是非常小的,所以在空调使用了四年左右的时候再考虑加也没问题。2、...
空调用多长时间需要加氟一次 一般情况下是五年。当出现以下这几种情况时,空调才需要加氟。1、空调的室内机和室外机各有两个接口,当接...
格调生活·C标思享荟:卡萨帝在... 9月12日的郑州龙湖金融岛,夜风轻拂,灯光璀璨。“C标时刻共传奇——卡萨帝思享荟暨20周年品牌盛典郑...
品牌价值破千亿、高端份额持续领... 9月12日,“C标时刻共传奇——卡萨帝思享荟暨20周年品牌盛典郑州站”在郑州龙湖金融岛举办。2026...
空调主板坏了修800还是换新的 空调主板坏了是修还是换新,需要考虑多个因素,以下是一些建议:1. 维修成本:如果维修费用较低,比如 ...
空调开多久需要休息多长时间 问题:空调开多久需要休息多长时间回答:1、在使用空调的过程中,一般空调开7~8个小时左右需要休息2~...
中央空调多长时间清洗一次 1、一般空调开机前清洗一次即可,空调开机中间时段再清洗一次,空调关机时清洗一次,这样比较合理。2、空...
中央空调氟利昂多久加一次 看空调制热和制冷程度,很多人的观点认为氟利昂必须一年放一次,其实这个观点是错误的,理解上面有点偏差,...