Installing and Administering Internet Services

48 Chapter 2
Installing and Configuring Internet Services
Configuring Anonymous ftp Access
Configuring Anonymous ftp Access
Anonymous ftp allows a user without a login on your host to transfer
files to and from a public directory. A user types the ftp command to
connect to your host and types anonymous or ftp as a login name. The
user can type any string of characters as a password. (By convention, the
password is the host name of the user’s host). The anonymous user is
then given access only to user ftp’s home directory, usually called
/home/ftp.
Configuring anonymous ftp access involves the following tasks,
described in this section:
“To Add User ftp to /etc/passwd” on page 48
“To Create the Anonymous ftp Directory” on page 48
You can follow the instructions in this section, or you can use SAM to
configure anonymous ftp access. SAM (System Administration
Manager) is Hewlett-Packard’s windows-based user interface for
performing system administration tasks. To run SAM, type sam at the
HP-UX prompt. SAM has an extensive online help facility.
To Add User ftp to /etc/passwd
Use a text editor to add a line for user ftp to the /etc/passwd file, as in
the following example:
ftp:*:500:guest:anonymous ftp:/home/ftp:/usr/bin/false
The password field should be *, the group membership should be guest,
and the login shell should be /usr/bin/false. In this example, user
ftp’s user ID is 500, and the anonymous ftp directory is /home/ftp.
Type man 4 passwd at the HP-UX prompt for information on the
passwd file.
To Create the Anonymous ftp Directory
1. Create the ftp home directory that you configured in the
/etc/passwd file, as in the following example:
cd /home
mkdir ftp