Problems with ifconfig in Fedora 8

Tim ignored_mailbox at yahoo.com.au
Tue Apr 22 10:47:08 UTC 2008


On Tue, 2008-04-22 at 11:46 +0200, Pedro Jose wrote:
> I send this question because in others computers with Fedora 8
> installed, when I login as root with su, ifconfig is available, but in
> my computer no. I'll try with su-, but my question is why  it works in
> other computers and not in mine with su. 

On each of your computers, type in an "echo $PATH" command, using the
different methods that you use to become root.  You'll see that Fedora
doesn't include /sbin in the path for non-root users.

If you switch users to root by just using "su" then you're still using
the non-root user's paths and environment.  If you log in as root, or do
"su -" to switch to root, then you're using the roots environment, which
includes /sbin.

The search path is used to find commands when you type in the command
without using the full path to the command.

i.e. Typing in "ifconfig" rather than "/sbin/ifconfig".

There's a reason that ordinary users don't include /sbin:  There can be
commands in /bin and /sbin with the same command name, but to do
slightly different roles.  The root user will use the first one if
finds, the one in /sbin, which may allow them to do more than what an
ordinary user can do with the /bin command.

-- 
(This computer runs FC7, my others run FC4, FC5 & FC6, in case that's
 important to the thread.)

Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.




More information about the users mailing list