Forum Discussion

Wallace1's avatar
Wallace1
Icon for Nimbostratus rankNimbostratus
Dec 10, 2015

TMSH vs BASH

Hello,

 

I am creating a script and have run into an issue. Some users have tmsh and other users have BASH. Is there a quick and easy way to test for bash vs tmsh? I tired to do the following:

 

test=$( ssh users@devcieip.com 'show sys version' |awk -F"::" '{ print $2}' if $test="Version" then tmsh list ltm virtual else list ltm virtual fi

 

Not sure what I am doing wrong, but if anyone has any ideas, that would be great.

 

Thank you.

 

2 Replies

  • If you log in to the bigip via ssh and run either "tmsh list auth user" if you get bash or "list auth user" if you get tmsh, you will see that there is a line for each user called shell.

     

    the 3 options available are none, bash or tmsh. This will tell you which shell they will get.

     

    If you want to change it you can write a script to go modify auth user shell bash to change everyone to bash for example.

     

    Cheers

     

  • Thanks for the reply Andrew, but I need to test if a user has bash or tmsh remotely (From a scritp run in a Linux server). The "if then else" logic for some reason isn't working. Just looking for a method to test before moving forward in the application.

     

    Thanks,