tbot icon indicating copy to clipboard operation
tbot copied to clipboard

running a tool that requires sudo permission

Open Adnan-Elhammoudi opened this issue 1 year ago • 1 comments

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?

Adnan-Elhammoudi avatar Feb 26 '24 16:02 Adnan-Elhammoudi

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.

Rahix avatar Mar 02 '24 10:03 Rahix