Test Description -
Automate execution of "tcpdump command to capture logs" through "Execute external command".
User for that execution is a non root user.
Problem statement -
In Test step, logging on the server is as a root user and creating the dumps . But we need to switch the user from root to specific user before tcmpdump command execution.
Solution tried so far -
We tried with
"su - username
tcpdump xyz.log" (it shows the owner as root)
Can anyone suggest how to change the user in command line or any shell script for the same?