LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   strange behaviour for strace -f (https://www.linuxquestions.org/questions/linux-newbie-8/strange-behaviour-for-strace-f-830770/)

luvshines 09-07-2010 07:12 AM

strange behaviour for strace -f
 
Ran into a weird situation I had not seen before while using strace -f command

I had to strace my 'passwd' command since I needed to debug something. But 'strace -f -o /tmp/file passwd' command failed to run

eraser@viper-laptop:~$ strace -f -o /tmp/passwd1 passwd
Changing password for eraser.
(current) UNIX password:
passwd: Authentication token manipulation error
passwd: password unchanged

If I drop -f option it works fine. I am using Ubuntu 10.4(Lucid Lynx), recently switched from fedora to ubuntu.

Any idea what could be the issue ??

crts 09-08-2010 12:10 AM

Hi,

when I tested it I got the same error. However,
Code:

sudo strace -f -o /tmp/passwd1 passwd <username>
worked. I am also using Ubuntu 10.04.

luvshines 09-08-2010 10:14 AM

I tried the same as super user and it worked as well.

What my assumption is that since it wouldn't ask the root user for the current passwd and directly asks for the new one, we encounter no issues

However, if it asks for the current passwd, -f of strace is sending some extra character due to which it fails to accept the current passwd itself. It can be wild guess, but that's the best I can think of :)


All times are GMT -5. The time now is 05:55 AM.