PDA

View Full Version : Fedora C1 Telnet Server Setup



Growly
21-06-2004, 07:05 PM
Hi there, after much searching google, I managed to find and install the telnet server that should otherwise come preinstalled with my fedora.

Two things:

1) I know it's running, but I can't log in under root. My password is the one I use for the GUI, and it doesn't work.

I know you have to change the telnet file in /etc/xinetd.d , but I don't think I need to, it already looks like this:

# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure += USERID
}

The line in bold is what I was told to change to no, which it already was.

Anything else that could be stopping me logging in as root?

2) When logged in as the other users (being able to do so proves the connection), I cannot ls. What do I change for this?

Thanks...

robsonde
21-06-2004, 11:47 PM
you can only login as root on the box.

if you telnet in you cant login as root, this is a security thing.

login as your normal user and the SU up to root.

Graham L
22-06-2004, 03:11 PM
When logged in, do echo $PATH . That will tell you the default path which allows you to give commands without the path. (If that doesn't work, do /bin/echo $PATH) :D.

They might be trying to discourage users from using telnet, by making it difficult. It's fine to use it on your own local network, but its a very bad idea to connect a machine running a telnet server to the Internet.

If you are going to use that machine as a firewall, it would be best to change that file so it has "disable = yes" . The service telnet start command should work now you have the server, so you can start it only when you need it and reboot or "service telnet stop" before you expose it.

Growly
22-06-2004, 08:12 PM
Oh, thanks.

Yeah i was reading and they said that you could actually change it - I
ll it give that a go.

This computer isn't connected to the internet, it's behind a firewall and will not be on alot.

Growly
22-06-2004, 08:18 PM
OK graham, I did the echo thing, but I wasnt quite clear how i was intended to use that...

Was i meant to go to one of those directory and service telnet start /stop?

Untill then, I'm still having trouble lsing.

Growly
22-06-2004, 08:29 PM
Ok the ls thing is sorted...

But how do I stop Segmentation Faults?

mark.p
22-06-2004, 08:36 PM
sig faults are a "feature" of Linux ;)

Growly
22-06-2004, 10:05 PM
You mean I can do nothing but cry about it?

Jen C
22-06-2004, 10:43 PM
> You mean I can do nothing but cry about it?

Yes, you can investigate why your app is segfaulting. :)

whiskeytangofoxtrot
22-06-2004, 11:33 PM
There should also be a built in SSH server which is secure, as opposed to Telnet which is very vulnerable.

Quite a bit to learn about that sort of thing, heaps on Google etc though. One of the first things to do would be to make sure you've diabled Telnet/SSH connections from outside your network to prevent anyone wandering by on the net from having a look, unlikely though it may be.

Web-Min is an excellent package, dunno how Fedora does package management, but WebMin gives a nice easy to use browser based GUI for editing much of the core configuration - made my life a lot easier.

segfault
23-06-2004, 01:24 AM
> > You mean I can do nothing but cry about it?
>
> Yes, you can investigate why your app is segfaulting.
> :)

Wasn't me, honest!

Try checking the logs. That may tell you why its crashing.

whiskeytangofoxtrot
23-06-2004, 01:39 AM
> you can only login as root on the box.
>
> if you telnet in you cant login as root, this is a
> security thing.
>
> login as your normal user and the SU up to root.
>

You can enable this feature, but it's extremely poor security practice. Even SSH as root isn't good.

Chilling_Silence
23-06-2004, 11:53 AM
Actually, Ive got a box that I only use as a server, and its got no other User logins except root (And the ftp, jabberd etc logins).

For day-to-day use, sure its bad practise to stay as root, but for a server you should technically have a "user' with root powers and then disable the root account.

Look into ssh, rather than telnet. Its more secure (But if its just over a LAN there's not much to worry about) and you can do things like X forwarding!

Run:
service sshd start
to start sshd

Then goto Google and search for:
Putty download

Get Putty.exe (Its a telnet client as well as an ssh client!) and use it to ssh into your Fedora box :-)

And anyways, to check the logs, try this after the app has just segfaulted:
tail -n 20 /var/log/messages

Hope this helps


Chill.

Growly
23-06-2004, 09:37 PM
Hey eveyone...

Thanks WTF and Chill, I remember that IT tech of ours using putty....

And where are these logs?

Growly
23-06-2004, 09:38 PM
Uh - scratch that - sorry chill, you told me exactly where the logs where...

*Embarassed*

Growly
23-06-2004, 09:48 PM
Ok putty is awesome.

But Uh the log thing doesnt show me any problems that I can see.

I ran the program (which happens to be hlds_l_3111_full.bin , the Valve Steam dedicated server), and straight after the problem came up, I checked the logs.

Here they are :D

[root@homeless root]# ./hlds_l_3111_full.bin
Segmentation fault
[root@homeless root]# tail -n 20 /var/log/messages
Jun 23 17:58:02 homeless kernel: PCI: Assigned IRQ 5 for device 00:07.5
Jun 23 17:58:02 homeless kernel: ac97_codec: AC97 Audio codec, id: VIA97 (Unknown)
Jun 23 17:58:02 homeless kernel: via82cxxx: board #1 at 0xDC00, IRQ 5
Jun 23 17:58:02 homeless modprobe: modprobe: Can't locate module sound-service-0-0
Jun 23 18:02:15 homeless pure-ftpd: (?@?) [WARNING] Unknown run-time option
Jun 23 18:02:20 homeless pure-ftpd: (?@?) [WARNING] Unknown run-time option
Jun 23 18:02:29 homeless su(pam_unix)[2608]: session closed for user root
Jun 23 18:02:29 homeless login(pam_unix)[2566]: session closed for user fedora
Jun 23 18:06:01 homeless pure-ftpd: (?@?) [WARNING] Unknown run-time option
Jun 23 18:06:18 homeless last message repeated 3 times
Jun 23 18:06:18 homeless pure-ftpd: (?@?) [ERROR] Configuration error: Illegal trusted gid for chroot: rt
Jun 23 18:08:37 homeless pure-ftpd: (?@192.168.0.50) [INFO] New connection from 192.168.0.50
Jun 23 18:08:37 homeless pure-ftpd: (?@192.168.0.50) [INFO] root is now logged in
Jun 23 18:09:35 homeless pure-ftpd: (?@192.168.0.50) [INFO] New connection from 192.168.0.50
Jun 23 18:09:35 homeless pure-ftpd: (?@192.168.0.50) [INFO] root is now logged in
Jun 23 18:10:40 homeless pure-ftpd: (root@192.168.0.50) [INFO] Logout.
Jun 23 18:10:40 homeless pure-ftpd: (root@192.168.0.50) [INFO] Logout.
Jun 23 20:38:04 homeless sshd: succeeded
Jun 23 20:42:00 homeless sshd(pam_unix)[2896]: session opened for user root by (uid=0)
[root@homeless root]#

Chilling_Silence
24-06-2004, 01:49 AM
LMAO - If its HLDS then there's a known bug in it and you have to put in folder XYZ... Have a google on the subject and it'll tell you where to put the file to get it to work :-)

Growly
24-06-2004, 07:16 PM
Bloody steam....