LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 01-22-2004, 02:32 PM   #1
king_nothingzzz
Member
 
Registered: Aug 2003
Location: Brisbane, Australia
Distribution: Red Hat Enterprise Linux 4
Posts: 120

Rep: Reputation: 15
Angry Commands dont work, even as root


Hi,
Everything was fine until i decided to reinstall Linux(Redhat9) for some reason. I did a typical installation with no problems at all. I then created a normal user account etc. Now, the problem is when i log in as root in a terminal with *su*, none of the commands work...

Commands like *ifconfig* , *setuid* , *getuid* etc dont work at all. Everytime it says command not found.
Heres how it looks

[user@localhost user]$ /bin/su
Password:
[root@localhost user]# ifconfig
bash: ifconfig: command not found
[root@LinuxRH9 mac]#

I thought it was a Path problem, but the path looks fine

This is the path

/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/mac/bin

I dont know what is the problem. I have never come across anything like this in all these days of browsing linux forums or using linux

Please advice on what to do

Thanks in advance

King Nothing
 
Old 01-22-2004, 02:54 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
With a simple 'su' you usually won't get root's full path. You will need to try using:

su -

or

su - root

And then make sure /sbin is in root's path as most of those commands you've mentioned are in that directory, which I think Redhat has failed to include by default at times for even root's path.

Regards.
 
Old 01-22-2004, 03:07 PM   #3
king_nothingzzz
Member
 
Registered: Aug 2003
Location: Brisbane, Australia
Distribution: Red Hat Enterprise Linux 4
Posts: 120

Original Poster
Rep: Reputation: 15
Thanks trickykid

Well it almost solved my issue...

You were absolutely right, with just an *su* the full path for root is not acquired

Heres the difference..

with an *su* the path = bin:/usr/bin:/usr/local/bin:/usr/bin/X11:/usr/X11R6/bin:/home/user/bin

with an *su - root* the path = /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin

As you can see the /sbin is already included..

Still there is a slight problem...*setuid* doesnt work even after *su -* or *su - root*

Cant think of any reason for this...

Can you tell me what mite be the reason and anything else that i need to do to set it right

Cheers

King Nothing
 
  


Reply



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
root commands don't work Fetch Linux - Newbie 3 01-24-2005 10:22 AM
keyboard commands and mozilla dont work Lleb_KCir Linux - Software 2 10-13-2004 06:55 PM
commands, some work some dont? Balkman Linux - Newbie 5 07-23-2004 11:58 AM
'make' and 'make install' commands dont work on my system? ginda Linux - Newbie 9 04-18-2004 11:17 AM
My commands dont work. ifconfig ? slice4e Linux - General 5 05-08-2003 11:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:27 PM.

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