How to run strace on setuid binaries like sudo
Issue
-
During debugging session of issues wtih the
sudocommand for a non-root user there is a need to collectstraceoutput for thesudocommand, so that the system calls can be investigated. -
Running
straceonsudoas a non-root user fails similarly to the following:
$ strace -Tttfvxyys 4096 -o sudo-strace.txt sudo -i
sudo: effective uid is not 0, is /bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?
Environment
- Red Hat Enterprise Linux 5
- Red Hat Enterprise Linux 6
- Red Hat Enterprise Linux 7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
