码迷,mamicode.com
首页 > Web开发 > 详细

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

时间:2017-06-15 00:42:39      阅读:7797      评论:0      收藏:0      [点我收藏+]

标签:网络   服务器   模拟器   虚拟内存   eve-ng   


文章列表(关注微信公众号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、......

点击查看配套视频教程!



技术分享



EVE-NG变身Learning Centre版本】

 

 

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

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

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

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

 

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

 

 

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

 

1、用admin账户登录,创建student1student2用户


技术分享


2、创建student1student2用户的拓扑

 

拓扑目录结构:

studentfolder

      --- student1.unlUNL

      --- student2.unlUNL

 

技术分享


技术分享


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



二、上传脚本并执行,切换到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:~#


技术分享



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

 

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‘;

修改相应内容,本文创建的folderstudentstudent1的拓扑是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:~#

 

 

四、用student1student2登录测试

 

1、用student1用户登录

技术分享

 

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

技术分享


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

技术分享

 

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

 

Logout退出

技术分享

 

 

2、用student2登录

技术分享


 

student2的拓扑上什么都没有

技术分享


Logout退出

 

3、再次切换到student1用户

技术分享


 

两个用户互不影响

 

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


技术分享


注意:在切换到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 | 森



本文出自 “情系の乌托邦” 博客,请务必保留此出处http://sms1107.blog.51cto.com/2795843/1936817

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

标签:网络   服务器   模拟器   虚拟内存   eve-ng   

原文地址:http://sms1107.blog.51cto.com/2795843/1936817

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!