LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   telnet (https://www.linuxquestions.org/questions/linux-newbie-8/telnet-332197/)

cyrus109 06-10-2005 09:40 AM

telnet
 
hi everyone

i am able to telnet to my linux box.
i created a user who is able to login through telnet.
then when i login i do the su command to swith to root.
and when i am logged in as root i still can't do commands like useradd.

I would like to able to this commands plus changing the iptables through telnet.

Does anyone know how to configure so that i can do that ?

I am running redhat 9


thx
cyrus

securehack 06-10-2005 09:45 AM

Why not just use vnc? That's just my opinion although telnet would be an alternative.

--Abid Kazmi

Artanicus 06-10-2005 09:49 AM

nowadays telnet should realy not be even an option for remote management, its unencrypted data loose on the net. VNC is ok if you need a GUI, but SSH is the serious thing nowadays with decent encryption.

Now, the actual question.. You explain it a tad blurrily. What do you mean you cant do those commands? As in "command not found" or as in "only root can do this" or something else? If its a "command not found", you should check out your .bash_profile .profile and /etc/profile to ensure $PATH is set to include /sbin/ and /usr/sbin/ for the root user, even when logging in remotely.

keefaz 06-10-2005 09:50 AM

Why not use ssh instead ?
[edit]
as Artanicus said

securehack 06-10-2005 09:52 AM

err forget everything.... go ssh2!! =D Didn't even think of that.

--Abid Kazmi

cyrus109 06-10-2005 09:53 AM

i get this error when i try for example the useradd command

[root@localhost etc]# useradd
bash: useradd: command not found

Artanicus 06-10-2005 09:57 AM

Quote:

Originally posted by cyrus109
i get this error when i try for example the useradd command

[root@localhost etc]# useradd
bash: useradd: command not found

yep, its then all in the $PATH .. an easy fix would be to add in /root/.bash_profile / .bashrc / .profile this:
Code:

export PATH=$PATH:/sbin:/usr/sbin

cyrus109 06-10-2005 10:07 AM

it works
 
yep that was it :-)

thx Artanicus

securehack 06-10-2005 12:51 PM

Quote:

when i am logged in as root i still can't do commands like useradd.
So when you said that the $PATH worked, can you do all the necessary or implemented commands?

--Abid Kazmi

cyrus109 06-12-2005 04:46 AM

yes now i could use useradd and such.
but now i have another problem i shutoff the linux and apparently i can't telnet to my linux box anymore.
i looked in the telnet file in the xinetd.d directory and it still says disable = no . so that can't be it.
even hosts.allow says ALL:ALL so that right i think.
even restarted the xinetd service but doesn't solve the problem.

does anyone know why it worked yesterday and today nomore ?

securehack 06-12-2005 10:18 AM

but now i have another problem i shutoff the linux

So you shut off the linux box throw telnet and now you can't access it? If that's the case, you won't be able to access it because it's turned off (obviously) so you need to know whether your motherboard supports Wake-On-LAN or something similar to start it up.

--Abid Kazmi

Mr. New 06-12-2005 10:46 AM

if you have physical access to the machine, turn it on and configure iptables there so you don't have to worry about blocking yourself

securehack 06-12-2005 10:58 AM

Yeah, that's right, if you have physical access, turn it on and your settings that you configured before, should be saved.

--Abid Kazmi


All times are GMT -5. The time now is 05:14 AM.