Using custom menus on SLCs running v5.4 or higher from the command line.

How do I set up custom menus for users on my SLC? Is it possible to set up a user who can exit to the CLI then re-start the menu?


To demonstrate menus we'll use two example local users name sheldon and leonard. Sheldon has full admin privileges, leonard has almost no privileges at all:


[SLC48_Gary]> sh localusers user sheldon
___Current Local Users Settings________________________________________________
Login: sheldon Status: Active
Password: <set> Password Expires: disabled
Change Password: enabled Change Password at Next Login: disabled
UID: 128
Data Ports: 1-48,U,L
Listen Ports: 1-48,U,L
Clear Ports: 1-48,U,L
Escape Sequence: \x1bA Break Sequence: \x1bB
Custom Menu: bb Display Menu at Login: disabled
Allow Dial-back: disabled Dial-back Number: <none>
Group: Administrators
Perms - Rights Allowed: ad,nt,sv,dt,lu,ra,um,dp,pc,rs,fc,dr,sn,wb,sk,do
Rights Denied: <none>
[SLC48_Gary]> show localusers user leonard
___Current Local Users Settings________________________________________________
Login: leonard Status: Active
Password: <set> Password Expires: disabled
Change Password: enabled Change Password at Next Login: disabled
UID: 127
Data Ports: 1-48,U,L
Listen Ports: 1-48,U,L
Clear Ports: 1-48,U,L
Escape Sequence: \x1bA Break Sequence: \x1bB
Custom Menu: bb Display Menu at Login: enabled
Allow Dial-back: disabled Dial-back Number: <none>
Group: Default Users
Perms - Rights Allowed: <none>
Rights Denied: ad,nt,sv,dt,lu,ra,um,dp,pc,rs,fc,dr,sn,wb,sk,do



Create a menu named bb:


[SLC48_Gary]> set menu add bb
Enter optional menu title (<return> for none): Big Bang
Specify nickname for each command? [no]
Enter each command, up to 50 commands ('logout' is always the last command).
Press <return> when the menu command set is complete.

Command #1: conn dir dev 1
Nickname #1: Sun_01
Command #2: conn dir dev 2
Nickname #2: SG23
Command #3: conn dir dev 3
Nickname #3: PBX_16
Command #4: conn dir dev 4
Nickname #4: Fedora_13
Command #5: conn dir dev 5
Nickname #5: Ubuntu_12
Command #6: conn dir dev 6
Nickname #6: RedHat_4
Command #7: <--press Enter with no command to finish entering menu
Command #7: logout
Nickname #7: <none>
Custom User Menu settings successfully updated.
[SLC48_Gary]> set menu edit bb shownicknames enable
Custom User Menu settings successfully updated.
[SLC48_Gary]> set menu edit bb redisplaymenu enable
Custom User Menu settings successfully updated.


If you want the menu to start on login, assign the custom menu to the affected users and enable 'displaymenu'.
E.g. leonard is configured to display the menu as soon as he logs in, and log out when he exits the menu:


[SLC48_Gary]> set localuser edit leonard custommenu bb displaymenu enable
Local users settings successfully updated.



Or a user can login and use the ‘set cli menu bb’ to open the menu, and logout returns back to CLI.
E.g. sheldon is configured to log into the CLI so he can start and stop the menu


[SLC48_Gary]> set localuser edit sheldon custommenu bb
Local users settings successfully updated.


Now if the user leonard logs in, he goes straight to the menu and cannot get out:


$ telnet 172.18.12.200

login: leonard
Password:

Welcome to the Secure Lantronix Console Manager
Model Number: SLC48
For a list of commands, type 'help'.

Big Bang
----------------------------------------------------------------------------
1) Sun_01 5) Ubuntu_12
2) SG_23 6) RedHat_4
3) PBX_16 7) logout
4) Fedora_13

[Enter 1-7]> 7
Executing: logout
Logging out...



But if sheldon logs in, he goes to the CLI, where he can start the menu, then exit back to the CLI:


$ telnet 172.18.12.200

login: sheldon
Password:

Welcome to the Secure Lantronix Console Manager
Model Number: SLC48
For a list of commands, type 'help'.

[SLC48_Gary]> set cli menu bb
Big Bang
----------------------------------------------------------------------------
1) Sun_01 5) Ubuntu_12
2) SG_23 6) RedHat_4
3) PBX_16 7) logout
4) Fedora_13
[Enter 1-7]> 7
Executing: logout
[SLC48_Gary]> <-- Typing 7 takes sheldon back to the CLI
[SLC48_Gary]> set cli menu bb <-- this re-starts the menu
Big Bang
----------------------------------------------------------------------------
1) Sun_01 5) Ubuntu_12
2) SG_23 6) RedHat_4
3) PBX_16 7) logout
4) Fedora_13
[Enter 1-7]> 7
Executing: logout
[SLC48_Gary]> lo
Logging out...

Connection to host lost.





[Originally Published On: 09/20/2010 11:21 AM]