Rahix / tbot

Automation/Testing tool for Embedded Linux Development
https://tbot.tools
GNU General Public License v3.0
91 stars 21 forks source link

running a tool that requires sudo permission #114

Open Adnan-Elhammoudi opened 9 months ago

Adnan-Elhammoudi commented 9 months ago

Hi @Rahix I need to run a tool on the lab host that requires root permission without user interaction to pass the password if required. any attribute made for that purpose or workaround can be made except adding nopasswd configuration?

Rahix commented 9 months ago

You should avoid handling passwords in tbot at all cost. The security implications are massive and tbot does not take any steps to keep any data confidential. Instead, you should handle authorization outside of tbot.

My personal recommendation is to always call sudo with -n from tbot to avoid any prompt for passwords anywhere. The commands that need to be called from testcases should be added with nopasswd config in the sudoers file.