09-22-2016 07:40 AM
I used to generate scripts which configure zoning on Brocade switches. The generated scripts starts with
cat << EOF | ssh admin@switch
echo yes | cfgclear
After recent upgrade to FabricOS v7.4.1d this no longer works becourse the echo command is no longer availible:
switch:FID128:admin> echo "Hello world"
rbash: echo: restricted
Is there a way to reactivate the echo command?
Or another way to clear the configuration without user interaction?
I don't want to use more complicated perl or python scripts, I like the simplicity of the shell scripts.
Solved! Go to Solution.
09-22-2016 05:43 PM
the echo command have been removed from admin (accounts) in FOS 7.4.1d and in FOS 8.0.1a, so you need to look for an alternate solution. I am not aware of any way to re-activate the echo command. A starting point might be:
[linux] $ echo y | ssh firstname.lastname@example.org "firmwareshow;date;cfgclear;cfgshow;exit"
Appl Primary/Secondary Versions
Fri Sep 23 01:36:01 GMT-1 2016
The Clear All action will clear all Aliases, Zones, FA Zones
and configurations in the Defined configuration.
Run cfgSave to commit the transaction or cfgTransAbort to
cancel the transaction.
Do you really want to clear all configurations? (yes, y, no, n): [no] Defined configuration:
no configuration defined
no configuration in effect
09-23-2016 06:38 AM
echo is removed from admin / user account (restricted bash shell). Still available under root.
10-21-2016 12:55 AM
with FOS 7.4.1e released yesterday, a small enhancement is included
Link to the releasenotes (from another recent post)
11-07-2016 01:57 AM
apropos releasenotes - why is this "feature" with the echo-command not mentioned in the releasenotes?
And what is the reason for it?
I find it very odd why you have to sign in as root to use the echo command.
During daily maintenance you should not have to sign in as root.
I use the echo command a lot in my scripts. Now a lot of them is not working any more - just a lot of "rbash: echo: restricted".
Not happy with this meaningless change. :-(
11-07-2016 03:12 AM
because of hardning (security) of FOS, the echo command (among other commands) was removed from the admin account (rbash shell). I am CLI persom myself and like to script / automate as much as possibe, so this threw a spammer in my scripts, too.
06-15-2017 01:45 AM