@@ -75,6 +75,18 @@ configure terminal
7575exit
7676```
7777
78+ ** Create Users with Privilege Levels**
79+
80+ ``` sh
81+ configure terminal
82+ username noc_view privilege 1 secret < password> # Basic user mode
83+ username net_ops privilege 5 secret < password> # Limited operations
84+ username net_admin privilege 15 secret < password> # Full admin
85+ exit
86+ ```
87+
88+ Default user EXEC level is 1. Privilege level 15 is full privileged EXEC access.
89+
7890** Secure Passwords**
7991
8092``` sh
@@ -84,6 +96,106 @@ configure terminal
8496exit
8597```
8698
99+ ### Authentication Levels & Permissions (AAA)
100+
101+ Use AAA when possible for centralized and more granular authentication/authorization.
102+
103+ #### Enable AAA with Local Database
104+
105+ ``` sh
106+ configure terminal
107+ aaa new-model
108+ aaa authentication login default local
109+ aaa authorization exec default local if-authenticated
110+ exit
111+ ```
112+
113+ This enforces local-user login and applies user privilege after authentication.
114+
115+ #### Privilege Levels (0-15)
116+
117+ - 0: Very limited commands (e.g., disable, enable, logout)
118+ - 1: User EXEC (default after login)
119+ - 15: Full privileged EXEC
120+ - 2-14: Custom levels for restricted operator roles
121+
122+ #### Assign Commands to Custom Privilege Levels
123+
124+ ``` sh
125+ configure terminal
126+ privilege exec level 5 show running-config
127+ privilege exec level 5 show startup-config
128+ privilege exec level 5 show ip interface brief
129+ exit
130+ ```
131+
132+ With this, a user at level 5 can run selected diagnostic commands without full admin access.
133+
134+ #### Command Authorization by Privilege Level
135+
136+ ``` sh
137+ configure terminal
138+ aaa authorization commands 15 default local
139+ exit
140+ ```
141+
142+ This can enforce command checks for level-15 commands using the configured method list.
143+
144+ #### Configure Enable Password for Specific Levels
145+
146+ ``` sh
147+ configure terminal
148+ enable secret level 5 < password_for_level_5>
149+ enable secret level 15 < password_for_level_15>
150+ exit
151+ ```
152+
153+ Users can move between levels with ` enable <level> ` when permitted.
154+
155+ #### Restrict Remote Access by User Type (Example)
156+
157+ ``` sh
158+ configure terminal
159+ line vty 0 15
160+ login local
161+ transport input ssh
162+ exit
163+ exit
164+ ```
165+
166+ Pair this with local users at different privilege levels to control remote admin rights.
167+
168+ #### Verification
169+
170+ ``` sh
171+ show running-config | section username
172+ show privilege
173+ show aaa methods
174+ ```
175+
176+ ### Role-Based CLI Views (Fine-Grained Permissions)
177+
178+ For stricter command-level control than classic privilege levels.
179+
180+ ``` sh
181+ configure terminal
182+ aaa new-model
183+ aaa authentication login default local
184+ enable view
185+
186+ parser view NOC-READONLY
187+ secret < view_password>
188+ commands exec include show ip interface brief
189+ commands exec include show version
190+ commands exec include show running-config
191+ exit
192+
193+ username noc_view view NOC-READONLY secret < password>
194+ exit
195+ ```
196+
197+ This allows a read-only role with only explicitly allowed commands.
198+
87199### System Administration
88200
89201#### Global Setup
0 commit comments