Forum Discussion
tmsh gui banner with multiline
Hi,
I know how to do it from GUI but I'd like find how to configure a multiline security banner directly from tmsh command line. For example let's say below banner:
Warning line1 and now line 2 and now line 3 and final line
I try this (using ' " " ' ) :
[root@vm-bigip-ltm-asm-01:Active:Standalone] config tmsh
root@(vm-bigip-ltm-asm-01)(cfg-sync Standalone)(Active)(/Common)(tmos) modify sys global-settings { gui-security-banner enabled gui-security-banner-text '"Warning line1
Syntax Error: single quotes are not balanced
root@(vm-bigip-ltm-asm-01)(cfg-sync Standalone)(Active)(/Common)(tmos) and now line 2
Syntax Error: unexpected argument "and"
root@(vm-bigip-ltm-asm-01)(cfg-sync Standalone)(Active)(/Common)(tmos) and now line 3
Syntax Error: unexpected argument "and"
root@(vm-bigip-ltm-asm-01)(cfg-sync Standalone)(Active)(/Common)(tmos) and final line"' }
Syntax Error: unexpected argument "and"
root@(vm-bigip-ltm-asm-01)(cfg-sync Standalone)(Active)(/Common)(tmos)
But nope 😕
Any idea please?
Regards.
4 Replies
Sorry I reply to my self...
tmsh modify sys global-settings { gui-security-banner enabled gui-security-banner-text '"Warning line1 and now line 2 and now line 3 and final line"' }Works just fine 😄
- jsprattler
Nimbostratus
Hi Sylvain, Thank you for providing this. I'm able to enter my multi-line security banner however it doesn't seem to save to the GUI when I break out of the command. How were you able to get this saved? I must be missing something simple here. Thanks in advance!
For example:
config tmsh modify sys global-settings { gui-security-banner enabled gui-security-banner-text '"Warning line1 and now line 2 and now line 3 and final line"' } [ENTER] > [CTRL+c] config Copy entire block like this:
tmsh modify sys global-settings { gui-security-banner enabled gui-security-banner-text 'Warning line1 and now line 2 and now line 3 and final line' }
which appears in CLI like this:
tmsh modify sys global-settings { gui-security-banner enabled gui-security-banner-text 'Warning line1
and now line 2 and now line 3 and final line' }
and GUI has this display:
Warning line1 and now line 2 and now line 3 and final line
- juju_302433
Nimbostratus
hi, for those who wants a dynamic banner, you can run regularly something like this :
tmsh modify sys global-settings gui-security-banner enabled gui-security-banner-text "`cat /etc/motd&&tmsh show cm failover-status | grep "Status "&&echo -e "\nUNAUTHORIZED ACCESS IS PROHIBITED\n\nPartition list :\n"&&tmsh list auth partition one-line | grep -vi common | sed -e "s/auth partition //" -e "s/ {.*//"`"
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
