If the banner is set via the config and then removed, the banner is still displayed on login.
So there is no delete option in the config script it seems.
Description
Details
- Difficulty level
- Unknown (require assessment)
- Version
- 1.4 1.3
- Why the issue appeared?
- Will be filled on close
- Is it a breaking change?
- Behavior change
- Issue type
- Cosmetic issue (typos etc.)
Event Timeline
The custom banner is removed after the deletion operation. But it shows the default banner:
login as: vyos Pre-authentication banner message from server: | Welcome to VyOS End of banner message from server [email protected]'s password: Check out project news at https://blog.vyos.io and feel free to report bugs at https://phabricator.vyos.net You can change this banner using "set system login banner post-login" command. VyOS is a free software distribution that includes multiple components, you can check individual component licenses under /usr/share/doc/*/copyright
Do you want to remove the default one as well ?
Well deleting the login banner results in the "default" behavior as expected.
If you do not wish to have any banner it is probably best to set the banner to ''.
@SrividyaA
FYI
I set the banners via set system login pre-login 'test' and/or set system login post-login 'test'
and then the banners are set. (and the default is overwritten)
If I then delete them delete system login pre-login and/or set system login post-login
the banners on ssh connection still display 'test' instead of nothing.
Interestingly if vyos-configd is in use this bug is triggered. If vyos-configd is not used the bug is not triggered :/
This is a mutability issue: since under vyos-configd the script is loaded as module, global variables persist, however:
banner = default_config_data
means changes to banner will change default_config_data. Fix with:
banner = deepcopy(default_config_data)
A copy would suffice, but in the unlikely case that the default banner data becomes a nested dict, we'll use 'deepcopy'. I will push the fix.