search
尋找貓咪~QQ 地點 桃園市桃園區 Taoyuan , Taoyuan

Juniper Junos使用者帳號設定 – KerKer 的模組世界

邊做邊學,順便留個筆記,若有錯誤請不吝指教。

本篇主要說明 Junos 使用者帳號的設定及相關參數說明

Junos基本操作及root密碼設定可參考我之前的文章:Juniper Junos基本操作、root密碼設定

使用者帳號為使用者提供了訪問設備的一種方式,對於每個使用者帳號,您可以定義以下內容:

Username – 識別使用者的名稱。它必須在設備中是唯一的。不要在用戶名中包含空格,冒號或逗號。用戶名最長可達64個字元。

Class – 使用者權限類別,系統預設了四種權限類別

operator – 具備clear, trace等指令的權限,及檢視設定檔的權限。
read-only – 僅具備檢視設定檔的權限
superuser – 具備所有權限(包含修改root密碼)
unauthorized – 無權限
User’s full name(可選) – 如果全名包含空格,請將其用引號括

Class的詳細設定方式可以參考:Juniper Junos使用者帳號權限設置(Class)

User’s full name(可選) – 如果全名包含空格,請將其用引號括起來。不要包括冒號或逗號。

UID(可選) – UID必須在100到64,000的範圍內,並且在設備中必須是唯一的。如果您沒有為用戶名分配UID,則系統會在您完成設定時分配一個UID。

在設定模式下使用已下指令創建使用者帳號,並給予相應權限分類:

root# set system login user [username] class [class name]

在設定模式下使用以下指令為使用者帳號設定plain-text-password:

root# set system login user [username] authentication plain-text-password 
New Password: [type password here]
Retype new password: [retype password here]

在設定模式下使用以下指令為使用者帳號設定encrypted-password:

root# set system login user [username] authentication encrypted-password [password]

在設定模式下使用下列兩條指令可以自定義full name及UID:

root# set system login user [username] full-name [User’s full name]
root# set system login user [username] uid [UID]

完成設定後記得要下”commit”來使設定生效,更多關於commit指令的內容可以參考:Juniper Junos提交設定(commit)

root# commit
configuration check succeeds
commit complete

完成設定後可以在命令列模式使用”show configuration system login”指令查看設定檔,以下設定是一個read-only權限帳號的範例:

root> show configuration system login 
user RD {
uid 2003;
class read-only authentication {
encrypted-password "$5$RlgvCGID$XF3MPshS9MxvYQKSagIWAODgwPNEPg5imH./3p/.0nB"; ## SECRET-DATA
}
}

起來。不要包括冒號或逗號。

UID(可選) – UID必須在100到64,000的範圍內,並且在設備中必須是唯一的。如果您沒有為用戶名分配UID,則系統會在您完成設定時分配一個UID。

在設定模式下使用已下指令創建使用者帳號,並給予相應權限分類:

root# set system login user [username] class [class name]

在設定模式下使用以下指令為使用者帳號設定plain-text-password:

root# set system login user [username] authentication plain-text-password 
New Password: [type password here]
Retype new password: [retype password here]

在設定模式下使用以下指令為使用者帳號設定encrypted-password:

root# set system login user [username] authentication encrypted-password [password]

在設定模式下使用下列兩條指令可以自定義full name及UID:

root# set system login user [username] full-name [User’s full name]
root# set system login user [username] uid [UID]

完成設定後記得要下”commit”來使設定生效

root# commit
configuration check succeeds
commit complete

完成設定後可以在命令列模式使用”show configuration system login”指令查看設定檔,以下設定是一個read-only權限帳號的範例:

root> show configuration system login 
user RD {
uid 2003;
class read-only; authentication {
encrypted-password "$5$RlgvCGID$XF3MPshS9MxvYQKSagIWAODgwPNEPg5imH./3p/.0nB"; ## SECRET-DATA
}
}






熱門推薦

本文由 KerKerwebsite 提供 原文連結

寵物協尋 相信 終究能找到回家的路
寫了7763篇文章,獲得2次喜歡
留言回覆
回覆
精彩推薦