Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-21-2004, 02:25 PM   #1
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Rep: Reputation: 30

only super user can do "ifconfig"

but when a normal user executes /sbin/ifconfig then also it executes

why is it so ??
Old 08-21-2004, 02:40 PM   #2
Registered: Mar 2004
Posts: 519

Rep: Reputation: 35
If a user types in:

$ ifconfig
($ being the prompt for a user)

Then ifconfig will not run, UNLESS, /sbin is in the user's path.

$ echo $PATH

Will output what the user's paths are, e.g.:


As you can see, my path variable does not contain /sbin so when I type in 'ifconfig', the terminal will not look in /sbin

If root types in:

# echo $PATH
(# being the prompt for a root user)

You may get: /usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin

As you can see, /sbin is there, so when 'ifconfig' is typed in, the terminal will look in /sbin

By typing in: /sbin/ifconfig

You are giving a full path, so the terminal does not have a search for the file, it simply executes the program you have given it.

Hope that's clear,

Old 08-21-2004, 05:14 PM   #3
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
A normal user can look at interface info with ifconfig (I do it all the time -- it's kinda handy not to have to become root just to look up my network settings), but can't change them. If you try to actually change anything as a normal user, you'll get a permission denied message.
Old 08-28-2004, 11:15 PM   #4
Registered: Jul 2004
Distribution: Red Hat 9, Mandrake 9.2
Posts: 211

Original Poster
Rep: Reputation: 30
thanks btmiller and SBing


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
connecting /sbin/ifconfig to bash command ifconfig flammable2 Fedora 4 11-12-2005 08:58 AM
Ifconfig mrodriguez Linux - Newbie 2 02-16-2005 01:17 PM
Oh where or where has ifconfig gone thotFree Linux - Software 3 11-13-2003 01:27 AM
Ifconfig ! mesta Linux - Software 2 02-04-2003 10:18 AM
ifconfig Astro Slackware 6 01-08-2003 05:30 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:02 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration