code-test

顯示具有 F5 標籤的文章。 顯示所有文章
顯示具有 F5 標籤的文章。 顯示所有文章

2014年4月30日 星期三

如何使用CLI 設定 F5 root/admin 的密碼?

如何使用CLI 設定 F5 root/admin 的密碼?

# tmsh
 
(tmos)# modify auth password root

changing password for root
new password:
confirm password: 
(tmos)# 


(tmsh0) # modify auth password admin

changing password for admin
new password:
confirm password: 
(tmos)#

如果不能登入F5 忘記密碼 如何做  Password Recovery ?
1) Reboot using front panel keys
2) Following this link to boot into single user mode https://support.f5.com/kb/en-us/solutions/public/4000/100/sol4178.html
3) Do the following
sh-3.2# passwd
Changing password for user root.
New BIG-IP password: 
Retype new BIG-IP password: 
Changing password for user root.
passwd: all authentication tokens updated successfully.
sh-3.2# reboot
INIT: Sending processes the TERM signal
 

2014年4月6日 星期日

F5 執行 .pl 異常 出現 /usr/bin/perl^M: bad interpreter: No such file or directory

F5 執行 .pl  異常/bin/sh^M: bad interpreter: No such file or directory

 出處 :http://eeepage.info/binshm-bad-interpreter-no-such-file-or-directory/

在Linux中執行.sh腳本
異常/bin/sh^M: bad interpreter: No such file or directory

分析:
這是不同系統編碼格式引起的:在windows系統中編輯的.sh文件可能有不可見字符,所以在Linux系統下執行會報以上異常信息。

解決:

1)在windows下轉換:
利用一些編輯器如UltraEdit或EditPlus等工具先將腳本編碼轉換,再放到Linux中執行。
轉換方式如下(UltraEdit):File-->Conversions-->DOS->UNIX即可

2)也可在Linux中轉換:
首先要確保文件有可執行權限
chmod a+x filename

 

然後修改文件格式
vi filename

利用如下命令查看文件格式
:set ff 或 :set fileformat

可以看到如下信息
fileformat=dos 或 fileformat=unix

利用如下命令修改文件格式
:set ff=unix 或 :set fileformat=unix

:wq (存檔退出)

最後再執行文件
./filename