HP-UX IP Address and Client Management Administrator's Guide (October 2009)

/usr/sbin/inetd -c
If you have both an /etc/passwd entry for the user tftp and the files specified in the tftpd
entry in the /etc/inetd.conf file, tftpd first looks for a file relative to the user tftps home
directory. If the file is not found, then tftpd looks for the file relative to the path specified in
the tftpd command. If two files with the same name are in both locations, tftpd accesses the
file under tftps home directory.
NOTE: HP recommends that you use Method 1 to configure tftp on your system.
Verifying the tftpd Installation
To verify the tftpd installation, create a file and use the tftp program to perform a file transfer
using the following steps:
1. Create a file that is readable by the user tftp. The file must be in the user tftps home
directory or in a directory specified with the tftpd entry. For example:
$ echo Hello, this is a test. > /export/testfile
$ chown tftp /export/testfile
$ chmod 400 /export/testfile
Make sure that an /etc/passwd entry exists for the user tftp.
2. Using a TFTP client, try to retrieve the file:
$ tftp localhost
tftp> get /export/testfile
Received 24 bytes in 0.6 seconds
tftp> quit
You can specify either the IP address or name of the remote host. To get a file from a directory
specified as an argument to the tftpd entry in the /etc/inetd.conf file, you must specify
the full path name of the file. If this step fails, see “Troubleshooting BOOTP and TFTP
Servers” (page 112).
3. Compare the ASCII files to verify data transfer:
$ diff testfile /export/testfile
$
If the diff command outputs 0 or nothing, both the ASCII files are the same, which means
tftp has transferred the data properly.
4. Remove the test file after you have verified the installation.
Command Options for Using TFTP
Internet Services includes /usr/bin/tftp, a TFTP client implementation. You can use this
client to verify if the TFTP server is working properly. For example, to retrieve the file bootf
from the TFTP server duncan, run the following command:
# /usr/bin/tftp duncan
At the tftp prompt, enter:
tftp> get bootf
The following message displays indicating a successful data transfer:
Received 23 bytes in 0.1 seconds
Table 3-3 describes the most common tftp commands that you can use when transferring files.
For information on other tftp options, type man 1 tftp on the HP-UX prompt.
Command Options for Using TFTP 111