18.EVE-NG變身Learning Centre版本及重置Web賬戶密碼


文章列表(關注微信公衆號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、......

點擊查看配套視頻教程!



wKioL1kiyFLiltmFAAbqCnW3vJc492.jpg-wh_50



EVE-NG變身Learning Centre版本】

 

 

  看過EVE-NG官網的朋友應該都知道,Learning Center版本對於學校,培訓機構來說非常實用,其中有幾個極其重要的Feature

1、多用戶同時登錄進行實驗,與其他用戶互不影響

2、每個用戶只能管理自己的實驗臺。

目前可以通過修改Community版本,簡單操作即可變身Learning Centre粗糙版。

 

注意:請一步一步跟着我做,如有步驟遺漏,可能導致失敗。在做之前請做好快照!

 

 

一、登錄Web界面,創建用戶及拓撲

 

1、用admin賬戶登錄,創建student1student2用戶


wKioL1lBEEPC5tp1AAF0gFRDUII534.png-wh_50


2、創建student1student2用戶的拓撲

 

拓撲目錄結構:

studentfolder

      --- student1.unlUNL

      --- student2.unlUNL

 

wKioL1lBEESx76GBAAEuDEW7dGA141.png-wh_50


wKiom1lBEEXS9gDnAAE4rIdZ_4U914.png-wh_50


3、退出admin賬戶並關閉所有EVE-NGWeb連接



二、上傳腳本並執行,切換到Learning Center版本

 

在微信公衆號中回覆Plus,獲取腳本


wKiom1lBEEXSln4dAAEUNtUWO_I699.png-wh_50


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


wKioL1lBEEaREUVBAAEfToR3vk0128.png-wh_50



三、修改用戶默認登錄路徑

 

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用戶登錄

wKioL1lBEEaBZTdqAAEtGcHb6O4173.png-wh_50

 

直接跳轉到拓撲界面,隨便加幾臺設備

wKiom1lBEEfy5fTCAAEnNKoEqYk512.png-wh_50


並且Close Lab是被禁用的,點擊無任何反映

wKioL1lBEEfTR0OzAAFmcHaIzGI408.png-wh_50

 

那麼該用戶就只能操作student1的拓撲

 

Logout退出

wKiom1lBEEjDycvRAAFoiQrlkKk355.png-wh_50

 

 

2、用student2登錄

wKioL1lBEEnAzy8uAAEueG3-BiI531.png-wh_50


 

student2的拓撲上什麼都沒有

wKiom1lBEEnQzb-xAAEmGbXAGc8327.png-wh_50


Logout退出

 

3、再次切換到student1用戶

wKiom1lBEEqzxsZiAAFBjZcOuLg446.png-wh_50


 

兩個用戶互不影響

 

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


wKioL1lBEEqQKH1cAADqQ4fkWAk018.png-wh_50


注意:在切換到Community版本後,千萬不要用student用戶登錄並Close Lab,這樣做會刷新student用戶登錄的默認路徑。如果路徑被刷新,那隻能重新操作第三步,再次修改。

在每次切換版本後,F5刷新一下Web

 

這時候就可以用admin賬戶登錄,管理所有拓撲了。

wKiom1lBEEuhx2VCAAEtjwm_GXE161.png-wh_50


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



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章