Operating System - HP-UX
1822011 Members
4172 Online
109639 Solutions
New Discussion юеВ

FTP and TELNET Session Banner

 
JUAN_17
Occasional Advisor

FTP and TELNET Session Banner

Hi everybody!

Sorry! my english is too bad!

When i login in my public Server via FTP, the server displays the banner
220 200.75.264.88 FTP server (Version wu-2.6.1-18) ready.

I need to change this banner, and the TELNET banner. How i can do this?

Thanks from Venezuela!
6 REPLIES 6
Jim Mallett
Honored Contributor

Re: FTP and TELNET Session Banner

Sean OB_1
Honored Contributor

Re: FTP and TELNET Session Banner

The telnet banner is changed via the /etc/inetd.conf file.

Add the following to the end of the command:

-b /etc/issue

You can change "/etc/issue" to any file that you want to store the banner information you want to be displayed.

Then recycle inetd by issuing "inetd -c".



James R. Ferguson
Acclaimed Contributor

Re: FTP and TELNET Session Banner

Hi:

For the 'telnet' banner, edit '/etc/inetd.conf' for the 'telnetd' daemon and specify the banner file you want with the -b bannerfile' option. For instance:

# telnet stream tcp nowait root /usr/lbin/telnetd telnetd -b /etc/issue

Then reconfigure:

# /usr/sbin/inetd -c

For the 'ftpd' daemon's banner configure the option in the 'etc/ftpd/ftpaccess' file. See the man pages for 'ftpaccess(4)'.

Regards!

...JRF...
Paul Sperry
Honored Contributor

Re: FTP and TELNET Session Banner

This feature is only available on HP-UX 11.x or later,
and is not available on HP-UX 10.20.

A ???banner??? is displayed when the ftp user connects, before the user enters a
username and password.

A ???message??? can be displayed after the ftp user enters a username and password
and has logged in, similar to Message of the Day (aka /etc/motd).


To add a banner and/or message:

1. In the /etc/inetd.conf file, verify that the -a option is added
to the ftpd daemon line to allow use of the configuration file
/etc/ftpd/ftpaccess. Modify /etc/inetd.conf if necessary.

ex: ftp stream tcp nowait root /usr/lbin/ftpd ftpd ???l -a

2. Modify the file /etc/ftpd/ftpaccess as needed, adding or changing
the ???banner??? and/or ???message??? directive.

NOTE: If /etc/ftpd/ftpaccess does not exist then it is recommended to
copy the ftpaccess file from /usr/newconfig/etc/ftpd/ftpaccess
to /etc/ftpd/ftpaccess and modify accordingly. If a blank
/etc/ftpd/ftpaccess is created, then be sure to also define
a ???class??? directive, otherwise failing to define a valid ???class???
for a host will cause ftp access to be denied.

For a ???banner???
add line: banner

ex: banner /etc/myftpbanner

For a ???message???
change line: message /welcome.msg login
to: message login

ex: message /etc/myftpmessage login


3. To reread the inetd.conf file and cause ftpd to use the
new /etc/ftpd/ftpaccess file execute:

#inetd -c

4. Use ftp to test the new ???banner??? and/or ???message???.


For more information please see man pages for ftpd, ftpaccess, and ftpusers.



Recommended patches for ftpd are:
---------------------------------
Patch PHNE_23949 release for 11.0
Patch PHNE_23950 release for 11.11

As with any patches these may be superceded, please use your normal patch
process or the IT Resource Center (www.itrc.hp.com) for the latest patch
information.CONFIGURATION
Operating System: HP-UX
Version: 11.x
Hardware System: HP9000
Elena Leontieva
Esteemed Contributor

Re: FTP and TELNET Session Banner

1. To enable a telnet login banner:
Add the desired message to the /etc/telnet_banner file.

Add the following entry to the end of the telnet line in the /etc/inetd.conf file:
-b /etc/telnet_banner
For example:

telnet stream tcp nowait root /usr/lbin/telnetd telnetd -b /etc/telnet_banner

2. To enable an ftp login banner or message:

NOTE: This feature is available on HP-UX 11.x or later.

Enable ftpd to use the /etc/ftpd/ftpaccess configuration file.


Add a '-a' option to the end of the ftp line in the /etc/inetd.conf file.

For example:

ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l -a

Add a message or banner line to the /etc/ftpd/ftpaccess file.

NOTE: If the /etc/ftpd/ftpaccess file does NOT exist, copy the /usr/newconfig/etc/ftpd/ftpaccess to the /etc/ftpd/ directory and modify it accordingly.

If a blank /etc/ftpd/ftpaccess file is created, be sure to define a "class" directive, otherwise ftp access will be denied.

For example:

banner /etc/ftp_banner
message /etc/ftp_message login

3. Reread the /etc/inetd.conf file:

inetd -c

Caesar_3
Esteemed Contributor

Re: FTP and TELNET Session Banner

Hello!

For ftp:
in /etc/inetd.conf line of ftpd made this: ...... /usr/lbin/ftpd ftpd ???l -a
and write the message to /etc/ftpd/ftpaccess
(* copy /usr/newconfig/etc/ftpd/ftpaccess)

For telnet:
in /etc/inetd.conf line of telnet made this: ...... telnetd -b
and write message to

In the end you need that inetd will run with
new changes so run: inetd -c


Caesar