LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Commands not available under telnet sessions? (https://www.linuxquestions.org/questions/linux-networking-3/commands-not-available-under-telnet-sessions-234373/)

paranoidpenguin 09-23-2004 12:54 PM

Commands not available under telnet sessions?
 
I have recently installed Redhat. Everything is working fine except when I telnet into the box using the telnet-server most of the commands are not available. They are however available in a local terminal. Even in the telnet session when I su to root they are still not there. Any ideas why this could be? Is there a file somewhere that disables sersitive functions for example?

Thanks guys.

david_ross 09-23-2004 01:10 PM

What do you mean "unavailable"?

Do they produce error messages? Also ake sure that the binaries are located somewhere in your $PATH.

paranoidpenguin 09-23-2004 01:26 PM

Like say for instance I try and run 'chkconfig', I get the following:-
bash: chkconfig: command not found

It's the same for most commands involving services and daemons. In the process of setting up Poptop and things like 'modprobe' and 'lsmod' give the same response of command not found. Things like 'rpm', 'telnet', 'ftp' etc work fine... I'm quickly becoming confused lol.

bastard23 09-23-2004 07:15 PM

Run:
echo $PATH
to see which directories it is searching for binaries.

On some systems the /sbin and /usr/sbin (Think system binaries: /sbin/lsmod) aren't in your path. When you su to root, you may need to run "su -", as this initializes root's environment (PATH HOME and such).

To fix this, you need to look at your .profile (or .bash_profile) and .bashrc. The first get run at login (telnet) time and may not source .bashrc. One fix is to put "PATH=/sbin:/usr/sbin:$PATH" into .profile (assuming you are running bash or other bourne compatible shells).

I don't have a mandrake box here right now, so I don't know what they do. Post back if you need more pointers.

Hope this helps,
chris

paranoidpenguin 09-23-2004 09:11 PM

Thats sorted it thanks... Put the 'PATH=/sbin:/usr/sbin:$PATH' into the file you said and that did it. The existing PATH was everything except the 'sbin' directories.

Thank you for your help, much appreciated!


All times are GMT -5. The time now is 06:58 AM.