su/kdesu not working

Chris Adams cmadams at hiwaay.net
Mon Nov 9 15:37:51 UTC 2009


Once upon a time, Roberto Ragusa <mail at robertoragusa.it> said:
> Chris Adams wrote:
> > Once upon a time, Roberto Ragusa <mail at robertoragusa.it> said:
> >> Big hammer:
> >>   strace -f su -
> > 
> > You can't strace a setuid executable.
> 
> You are right.
> Actually the execution will still happen, but with no root
> authority, so it will not be useful for debugging.
> Seeing some output incorrectly made me think it was working.

And to follow up to my brief response, you _can_ strace a setuid
executable with an extra step.  If you run strace as root, you can pass
the "-u <username>" argument, and it will switch users first (but still
trace correctly).  So, as root, you could do:

# strace -u foo -f su -

-- 
Chris Adams <cmadams at hiwaay.net>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.




More information about the users mailing list