ftp:*:12276:0:99999:7:::
...
The shadow file (only a portion of which is shown in Listing 34.1) contains
additional information not found in the standard /etc/passwd file, such as
account expiration, password expiration, whether the account is locked, and
the encrypted password. The * in the password field indicates that the account
is not a standard login account; thus, it does not have a password.
Although shadow passwords are in use on the system, passwords are not
transmitted in a secure manner when using FTP. Because FTP was written
before encryption and security became so necessary, it does not provide the
mechanics necessary to send encrypted passwords. Account information is
sent in plain text on FTP servers; anyone with enough technical knowledge
and a network sniffer can find the password for the account you connect to on
the server. Many sites use an anonymous-only FTP server specifically to
prevent normal account passwords from being transmitted over the Internet.
QUICK-AND-DIRTY FTP SERVICE
Conscientious Linux administrators take the time to carefully install, set up,
and configure a production FTP server before offering public service or
opening up for business on the Internet. However, you can set up a server
very quickly on a secure LAN by completing a few simple steps:
- Ensure that the FTP server package is installed, networking is enabled,
and firewall rules on the server allow FTP access. See Chapter 18,
“Networking,” to learn about firewalls. - If anonymous access to server files is desired, create and populate the
/srv/ftp /public directory. Do this by mounting or copying your
content, such as directories and files, under this directory. You don’t
want to use symlinks, however, because a clever anonymous user could
easily use that against you to access other parts of your file system. If
you are new to this, copy your content into the directory. - Edit and then save the appropriate configuration file (such as
/etc.vsftpd.conf for vsftpd) to enable access. - Start or restart the FTP server with the following command: sudo
service vsftpd restart.
You can use the service to start, stop, restart, and query the vsftpd server.
You must have root permission to use the vsftpd script to control the server,
but any user can query the server (to see whether it is running and to see its
process ID number) by using the status keyword, like this: