At 10:35 AM 9/8/2003 -0600, Anna G. Zapata wrote:
Hello,

I am running Red Hat 8.0.  When I run ifconfig as a user, I cannot see what
the IP address is of my box.  However, when I switch to being a root user
(su -) and run ifconfig, I can see the IP address.  How do I set my $PATH so
I can run ifconfig as a regular user?  Or is this possible?

Here is the user path:

-bash: /usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/azapata/bin

Root path:

-bash:
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/u
sr/X11R6/bin:/root/bin

Let me know if I am missing any useful information.


When you say "cannot see", I assume you mean you get a response like this one:

        [EMAIL PROTECTED]:~$ ifconfig
        -bash: ifconfig: command not found

(If I've misinterpreted your question, the rest of this response is irrelevant and you need to ask your question again, explaining what "cannot see" means.)

Normally, ifconfig is in /sbin, which is in root's PATH but not non-root users' default PATH. The easiest solution is simply to run the command as:

[EMAIL PROTECTED]:~$ /sbin/ifconfig

which will cause it to execute just fine.

Second option: add a symlink in (probably) /bin to ifconfig, so the normal default PATH for non-root users will execute ifconfig via the symlink.

Third option: add /sbin to non-root PATHs. How you do that depends a bit on where RH8.0 gets its PATH info from, something I don't know offhand. Probably you need to edit the PATH line in /etc/profile &/or the one for non-root users in /etc/login.defs .



-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Reply via email to