Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 06-25-2005, 03:48 AM   #1
Registered: Mar 2005
Location: India
Distribution: RedHat 9.0 and EL
Posts: 31

Rep: Reputation: 15
problem in running the command as a normal user

Hello Buddies,

This is very basic question thats make me a fool:

When I logged in as a root on my linuxbox and run the command
it executes without any problem.

But when I looged in as a junaid it gives an error:

bash: ifconfig: command not found
I thought that ifconfig is restricted command that only root can use.(I think I am right, am I ?)

Upto this is Cool

But when I looged in as a root and swith to juniad using
su junaid
and runs the command
it executes without any problem.

I also tried to give the full access to junaid in
file but while logging as junaid when I run
sudo ifconfig
it gives me the same error.

Will you please explain the above problem.

Old 06-25-2005, 03:56 AM   #2
Registered: Mar 2005
Location: India
Distribution: RedHat 9.0 and EL
Posts: 31

Original Poster
Rep: Reputation: 15
TO my surprice when I logged in as junaid and switches to root using su and runs the command ifconfig it still gives the error.

In short:

user ------->su------->result

root ------->--- ------->OK

root ------->junaid ------->OK

Junaid ------->--- ------->Failed

Junaid ------->root ------->Failed

Old 06-25-2005, 06:27 AM   #3
LQ Guru
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 232Reputation: 232Reputation: 232
Because you don't have /sbin in your path..

su -


su - root

will give you root's full complete path environment. a simple su won't.

And if you want to run this command by simply typing ifconfig for a regular user, add the /sbin directory to your $PATH


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Running super user commands as normal user mickyg Linux - Security 5 10-14-2005 07:25 PM
can normal user use shutdown command? sorno Linux - Newbie 2 07-30-2005 06:11 AM
problem running stormpkg as normal user drrnsk8ter4 Linux - Software 0 04-24-2004 01:15 AM
normal user running shutdown cblamer Slackware 6 12-21-2003 08:44 PM
running ethereal as a normal user tangle Linux - Software 1 02-04-2003 09:35 PM

All times are GMT -5. The time now is 11:29 PM.

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