🔥 3-day streak
CompTIA Linux+ (XK0-006)115 / 123
Question 115 of 123

A developer needs to run a backup script via sudo that depends on the custom environment variable BACKUP_TARGET set in their shell. When they run 'sudo ./backup.sh', the script fails because BACKUP_TARGET is empty. You confirm the variable is exported in their session. Which approach correctly passes this single variable through sudo without disabling sudo's environment security globally?

Reviewed for accuracy · Report an issueNext question