>
> It sounds to me like bash is not recognizing when you run as root.
> Try something like `set | grep UID' from your root shell and confirm that
> both UID and EUID are zero. I'm not sure that's the exact mechanism used
> by bash, but if they are right or wrong might give a clue where to start
> looking....
>
> Hope that helps,
> Brandon.
>
>
set | grep UID returns 0 for both the UID and EUID. I took a look at the
Bash source -- well, more like I grepped it -- and found these lines
relevant to the substitution starting at line 5490 of y.tab.c:
case '$':
t = temp = (char *)xmalloc (3);
if ((promptvars || posixly_correct) && (current_user.euid != 0))
*t++ = '\\';
*t++ = current_user.euid == 0 ? '#' : '$';
*t = '\0';
goto add_string;
I don't know c (one of the things I want to learn but haven't got
started), but I'm wondering if there's supposed to be the asterisk
before the 't ='? Most of the other case statements (for the other
prompts) don't have the asterisk before the variable.
Walk in peace.
Andrea Reina
--
http://linuxfromscratch.org/mailman/listinfo/lfs-chat
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page