MFA cli script
1 Topicunable insert and run cli script to tmos
Hi all , Can somebody advice what is the correct step to insert the cli script into the F5 system. it is appreciate for any comment or advice given. i am facing an error as i with enable auto enrollment of data into datagroup with google authenticator solution with link below . https://github.com/yamashin55/f5-google-authenticator-datagroup/blob/master/index.mdf5-google-authenticator-datagroup/index.md at master · yamashin55/f5-google-authenticator-datagroup (github.com) Base on the step , when #tmsh list cli script , it shall with positive result showing as below cli script add_totp_key { proc script::run {} { set cmd "tmsh::modify /ltm data-group internal [lindex $tmsh::argv 3] \{ records add \{ [lindex $tmsh::argv 1] \{ data [lindex $tmsh::argv 2] \} \} \}" tmsh::log "Executing the command: $cmd" eval $cmd } total-signing-status not-all-signed } Thus , i am go to tmsh command with work on this accordingly with put in the exactly same script.and it state is error . please see below output with show error"total-signing-status" is a read-only property. Then , i am delete the syntax "total-signing-status not-all-signed" and system are allow without error. ==TMSH CLI output root@(bigip01)(cfg-sync Standalone)(Active)(/Common)(tmos)# edit cli script add_totp_key root@(bigip01)(cfg-sync Standalone)(Active)(/Common)(tmos)# edit cli script add_totp_key Save changes? (y/n/e) y Syntax Error: "total-signing-status" is a read-only property There were errors. Continue editing(y) or discard changes(n) (y/n) ==TMSH output end == However , i proceed the test and i found my solution not working and i dig down it likely the script didnt process accordingly . Then i run another command #run cli script add_totp_key, it introduce an error message likely showing the script are not working as show below ==tmsh output start == root@(bigip01)(cfg-sync Standalone)(Active)(/Common)(tmos)# run cli script Configuration Items: add_totp_key delete_totp_key f5.app_utils Options: file verbatim-arguments root@(bigip01)(cfg-sync Standalone)(Active)(/Common)(tmos)# run cli script add_totp_key add_totp_key: script failed to complete: can't eval proc: "script::run" "{" unknown property while executing "tmsh::modify /ltm data-group internal { records add { { data } } }" ("eval" body line 1) invoked from within "eval $cmd" (procedure "script::run" line 4) invoked from within "script::run" line:1 script did not successfully complete, status:1 root@(bigip01)(cfg-sync Standalone)(Active)(/Common)(tmos)# ==tmsh output end ==831Views0likes3Comments