Operating System - HP-UX
1823415 Members
2712 Online
109655 Solutions
New Discussion юеВ

FTP system message of the day (MOTD)

 
Anthony Alvarez_1
Occasional Contributor

FTP system message of the day (MOTD)

I know this has to be really basic, and apologies for the question, but I couldn't find it elsewhere in the forum, so apologies if this is a FAQ.

Could you kindly share your experience with me?

We need to configure the FTP server so that all users see a standard system message.

How can HPUX Message of the day ( MOTD ) functionality be set for all FTP users?

We are using HPUX v10.20's built in FTP server.
Any clues, suggestions, tips or advise are greatly appreciated. Please advise.

I look forward to hearing from you. Thanks in advance.
5 REPLIES 5
Greg Geyer
Frequent Advisor

Re: FTP system message of the day (MOTD)

check the man page for ftpaccess. I believe you want to modify the banner or message option in that configuration file (/etc/ftpd/ftpaccess).

Any modification of that file requries another "inetd -c" command to reread the config files.
Steven E. Protter
Exalted Contributor

Re: FTP system message of the day (MOTD)

He's right.

Here is part of the man page.

Informational Capabilities
greeting { full|brief|terse }

greeting text message

message path [ when [ class... ]]

Define a file with path such that ftpd will display the contents
of the file to the user at login time or upon using the change
working directory command. The when parameter may be LOGIN or
CWD=dir. If when is CWD=dir, dir specifies the new default
directory which will trigger the notification.

The optional class specification allows the message to be
displayed only to members of a particular class. More than one
class may be specified.

In the message file, the user can key in a message and use the
`macros' or `magic cookies' that are available. The ftp server
will replace the cookie with a specified text string. The
following magic cookies are available:

%T local time (form Thu Nov 15 17:12:42 1990)

%C current working directory

SEP

Might be fun to play with this...
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Chris Wong
Trusted Contributor

Re: FTP system message of the day (MOTD)

There are two types of banners (described below) that get set in the ftpaccess file. However, if you are running 10.20, I'm not sure you are running WU-FTP which uses the ftpaccess file.


banner: Example: banner /etc/ftpd/banner_msg
Description: This displays a banner to the client prior to the name prompt.

message: Example:
message /home/ftp/etc/message_msg login
Description:
The contents of the message file are displayed to the client after successful login. You may note that I placed this message file in a
different directory. The message file must be placed in a directory that grants the client execute access. The permissions on the /etc/ftpd
directory do not allow the client (other) execute access. However, the /home/ftp/etc directory does, so I placed the message file here. The
sample ftpaccess file uses the /etc/msgs directory, this directory is not automatically created. The banner file can be placed in the /etc/ftpd
directory since it is the FTP daemon that is reading this file, not the client (they have yet to login). The minimum file permissions on the message file are 444.

or http://newfdawg.com/SHP-FTP-ftpaccess.htm for the whole article.

- Chris
T G Manikandan
Honored Contributor

Re: FTP system message of the day (MOTD)

create the .motd file in the /etc directory.
Enter the message you want to appear when user logs.

Thanks
Balaji N
Honored Contributor

Re: FTP system message of the day (MOTD)

and ftpd must be running with the "-a" option which enables the use of the ftpaccess configuration file. man ftpd for details

hth
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.