Re: Strange behavior observed w.r.t 'su' command

From: Raj
Date: Fri Nov 28 2003 - 04:57:17 EST


One more observation:

This time i wrote two shell functions, one for the user and another for root. I placed them in the .bash_profile

for root
z()
{
touch /tmp/createdbyroot
}

for user
z()
{
touch /tmp/createdbyuser
}

I then reproduced the problem, and during the alternation of the prompts, when i was on the user prompt, i ran 'whoami' and it showed me as a normal user. Then i ran 'z'. I expected the filename in /tmp to be 'createdbyuser' but it is actually 'createdbyroot' !!!

/Raj

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/