LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-10-2005, 09:40 AM   #1
cyrus109
LQ Newbie
 
Registered: Jun 2005
Posts: 4

Rep: Reputation: 0
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
 
Old 06-10-2005, 09:45 AM   #2
securehack
Member
 
Registered: Sep 2003
Location: United States
Distribution: Slackware 10.1, Debian 3.0, WinXProSP1, Fedora Core 3
Posts: 425

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

--Abid Kazmi
 
Old 06-10-2005, 09:49 AM   #3
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
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.
 
Old 06-10-2005, 09:50 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 5,388

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
Why not use ssh instead ?
[edit]
as Artanicus said
 
Old 06-10-2005, 09:52 AM   #5
securehack
Member
 
Registered: Sep 2003
Location: United States
Distribution: Slackware 10.1, Debian 3.0, WinXProSP1, Fedora Core 3
Posts: 425

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

--Abid Kazmi
 
Old 06-10-2005, 09:53 AM   #6
cyrus109
LQ Newbie
 
Registered: Jun 2005
Posts: 4

Original Poster
Rep: Reputation: 0
i get this error when i try for example the useradd command

[root@localhost etc]# useradd
bash: useradd: command not found
 
Old 06-10-2005, 09:57 AM   #7
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
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
 
Old 06-10-2005, 10:07 AM   #8
cyrus109
LQ Newbie
 
Registered: Jun 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Talking it works

yep that was it :-)

thx Artanicus
 
Old 06-10-2005, 12:51 PM   #9
securehack
Member
 
Registered: Sep 2003
Location: United States
Distribution: Slackware 10.1, Debian 3.0, WinXProSP1, Fedora Core 3
Posts: 425

Rep: Reputation: 30
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
 
Old 06-12-2005, 04:46 AM   #10
cyrus109
LQ Newbie
 
Registered: Jun 2005
Posts: 4

Original Poster
Rep: Reputation: 0
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 ?
 
Old 06-12-2005, 10:18 AM   #11
securehack
Member
 
Registered: Sep 2003
Location: United States
Distribution: Slackware 10.1, Debian 3.0, WinXProSP1, Fedora Core 3
Posts: 425

Rep: Reputation: 30
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
 
Old 06-12-2005, 10:46 AM   #12
Mr. New
Member
 
Registered: Oct 2004
Distribution: Kubuntu and Mac OS X
Posts: 80

Rep: Reputation: 15
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
 
Old 06-12-2005, 10:58 AM   #13
securehack
Member
 
Registered: Sep 2003
Location: United States
Distribution: Slackware 10.1, Debian 3.0, WinXProSP1, Fedora Core 3
Posts: 425

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

--Abid Kazmi
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I setup telnet on Fedorac1 so I can telnet to it from winxp? mman49 Fedora 6 05-02-2004 12:40 PM
can not telnet localhost 25 but telnet dowell.exper.dynserv.com 25 exper Linux - Software 0 02-25-2004 05:13 AM
Telnet localhost and telnet IP seb77 Linux - Newbie 4 10-15-2003 03:15 PM
enable telnet but can't telnet from the computer guanyu Linux - Networking 8 08-26-2002 06:34 AM
telnet local but no-telnet via internet blacksheep Linux - Networking 7 11-26-2001 02:33 PM


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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration