如果是使用一段時間了,而且忘記了背景密碼,并不推薦初始化資料,這樣會丢失掉使用者資料
這裡推薦使用一種方法:
就是從資料庫裡面去更改manager的密碼,更改密碼之前要檢視密碼的加密方式
mysql> use extmail
select * from manager;
[email protected] | $1$kRPBB1$..yHtwzaWnZxXC9A2Qkg/1 | admin | root | Super User | my question | my answer | 0 | 2007-02-14 15:10:04 |0000-00-00 | 1 |
是加密的,不是明文的方式,檢視mysql的加密方式從webman.cf配置檔案中檢視
Cat /usr/local/apache/htdocs/extman/webman.cf
sys_crypt_type:crypt|cleartext|plain|md5|md5crypt|plain-md5|ldap-md5|sha|sha1
SYS_CRYPT_TYPE = md5crypt
加密方式是md5crypt,是以,你在更改密碼時,也是需要先進行md5crypt加密
Md5 加密的話,就通過grub shell進行就好了
終端下直接輸入grub
grub
Probing devices to guess BIOS drives. Thismay take a long time.
GNU GRUB version 0.97 (640K lower / 3072K upper memory)
[Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub>md5crypt (加密的方式)
md5crypt
加密的密碼
Password: biao_123
加密過後,現在就在資料庫裡面更改背景管理的密碼
登入到mysql庫,
執行SQL語句
update manager set password="$1$MFZBB1$mPWIIchjs5PMyZ26PQ2bR/"(加密的密碼) whereusername='[email protected]';
flush privileges;
現在就可以通過背景URL,使用[email protected]/biao_123登入了
登入背景之後,發現會提示你Connectionrefused,
隻需要啟動一個服務就好,是在你extman下的一個cmdserver程式
/usr/local/apache/htdocs/extman/daemon/cmdserver–daemon 就可以解決這個問題了
本文轉自天真花語 51CTO部落格,原文連結:http://blog.51cto.com/caibird/1205540,如需轉載請自行聯系原作者