You are not logged in.
Pages: 1
When trying to run certain commands such as reboot, shutdown and iwconfig I get "command not found" yet running them as root presents no issues:
[16:50][adam@jesse ~]$ iwconfig
bash: iwconfig: command not found
[16:50][adam@jesse ~]$ su -
Password:
[root@jesse ~]# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
[root@jesse ~]#
any ideas? I did re-install earlier, but followed the same steps as first time and had no issues then so am a bit stumped...
Cheers for any help
Offline
This could be a path related problem. What do you get when you run "echo $PATH" as a normal user and root? What is the output of "ls -l /usr/sbin/iwconfig"? What happens if you start programs with a full path?
Last edited by Morra (2008-05-22 16:25:39)
Offline
As root:
/bin:/usr/bin:/sbin:/usr/sbin:/opt/mozilla/bin:/usr/bin/perlbin/site:/usr/bin/perlbin/vendor:/usr/bin/perlbin/core
As normal user:
./:/bin:/usr/bin:/usr/local/bin:/usr/bin
You got it in one Morra, a path issue. any reason why they are not the same by default? Solved the issue by copying the root PATH into my .bashrc, but it would be nice to know why they aren't the same.
Offline
The default path is set in /etc/profile which is the first settings file read after you login. Check to see whether there is a .pacnew of this file that should be merged.
Also, having the current directory (.) at the start of your path is not the best idea, if you must have it, put it at the end.
Offline
Those are just the defaults, but have moved the current directory to the end as suggested.
No .pacnew hanging around. Cheers for the help so far.
Offline
Programs residing in /sbin and /usr/sbin are (by unix standards) meant be only run as root. If you feel like you want to run them as a user, just add them to your PATH in ~/.profile or ~/.bashrc or such. Mostly you need root privileges to do something with them, although running for informational purposes (like 'iwconfig') doesn't require any special privileges.
Offline
Pages: 1