Posted by: isaraffee | September 14, 2009

Configuring telnet in Internet Superserver in Ubuntu 9.04 Jaunty

Configuring telnet in Internet Superserver in Ubuntu 9.04 Jaunty

To install telnet server, you will first need to install the Internet Supserserver, inetd package.

# apt-get install xinetd

Setting up xinetd (1:2.3.14-7ubuntu1) …

* Stopping internet superserver xinetd [ OK ]

* Starting internet superserver xinetd [ OK ]

Check if the xinetd service is running

# ps -ef|grep xinetd

root 8569 1 0 02:48 ? 00:00:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6

Now install the telnet server package, telnetd

# apt-get install telnetd

Adding user telnetd to group utmp

——— IMPORTANT INFORMATION FOR XINETD USERS ———-

The following line will be added to your /etc/inetd.conf file:

telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd

If you are indeed using xinetd, you will have to convert the

above into /etc/xinetd.conf format, and add it manually. See

/usr/share/doc/xinetd/README.Debian for more information.

Suggested entry (automatically converted using itox):

service telnet

{

socket_type = stream

protocol = tcp

wait = no

user = telnetd

<output truncated for brevity>

telnetd will not be running as it is installed as an Internet Superserver, which means it listens to telnet requests.

Check that telnetd server is included in the /etc/inet.conf file

root@ismail-laptop:~# more /etc/inetd.conf

#<off># ftp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/proftpd

telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd

Now you need to create the telnetd script in /etc/xinetd.d directory:

# cd /etc/xinetd.d

#vi telnetd

service telnetd

{

disable = no

type = INTERNAL

socket_type = stream

protocol = tcp

user = root

wait = no

}

Restart the xinetd services

# /etc/init.d/./xinetd restart

Also check that you have the in.telnetd files in /usr/sbin

# ls /usr/sbin/ in*

in.proftpd inputattach install-docs install-info install-sgmlcatalog in.telnetd invoke-rc.d

Now telnet to your local machine using a valid user account.

root@ismail-laptop:~# telnet localhost

Trying ::1…

Connected to localhost.

Escape character is ‘^]’.

Ubuntu 9.04

ismail-laptop login: ismail

Password:

Last login: Wed Aug 19 03:02:08 SGT 2009 from localhost on pts/4

Your should be able to telnet using your user account, except root.

To allow root to telnet edit the following file:

# cd /etc/pam.d/

Edit the file called login or remote and mask out the following line:

#auth [success=ok ignore=ignore user_unknown=ignore default=die] pam_securetty.so

Now restart the xinetd services and telnet using root:

# /etc/init.d/./xinetd restart

Ubuntu 9.04

ismail-laptop login: root

Password:

Last login: Wed Aug 19 02:26:06 SGT 2009 from localhost on pts/4

Linux ismail-laptop 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 19:49:51 UTC 2009 i686

Last was Wednesday 19,August,2009 03:12:26 AM SGT on pts/4.

root@ismail-laptop:~#

Yes you can now telnet using root account.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: