System Administration Guide: Resource Management and Network Services

How to Set Up Guest FTP Users

The ftpconfig script is used to copy all necessary system files to the home directory. When the guest user and the guest's home directory already exist, the ftpconfig script updates the area with the current system files.

For more information, see ftpconfig(1M)


Note -

Unlike the user name (anonymous or ftp) that is set for anonymous users, user names for FTP guests are not fixed. Any name that would work as a real user name can be selected.


To enable access by a guest user to the FTP server, do the following:

  1. Use the useradd script to create a guest user account with a login shell of /bin/true and a home directory of /root_dir/./home_dir.

    For more information, see useradd(1M) and "Managing Use Accounts and Groups (Overview)" in the System Administration Guide, Volume 1.


    Note -

    In this procedure, /home/guests/./guest1 is used as the home directory name for a user who is called guest1.



    # /usr/sbin/useradd -m -c "Guest FTP" -d \
      /home/guests/./guest1 -s /bin/true guest1
    
  2. Assign a password to the guest account.

  3. Add a guestuser entry to the ftpaccess file.


    guestuser guest1

    Note -

    You can also use the guestgroup capability in the ftpaccess file to specify guest users. The guest-root capability in ftpaccess eliminates the need for the /./ in the guest user's home directory path.


  4. Confirm that the guest user is a member of a class in the ftpaccess file. See "How to Define FTP Server Classes" for further information.

  5. Use the ftpconfig script to create the required files in the chroot area.


    /usr/sbin/ftpconfig -d /home/guests
    
  6. Confirm that /bin/true is listed in the /etc/shells file. See "How to Create the /etc/shells file".

Example-Setting Up a Guest FTP Server

In this example, the FTP area is set up in the /home/guests directory.


# /usr/sbin/ftpconfig -d /home/guests
Updating directory /home/guests