What is the account field used for on an FTP Server, vs the username
Probably a stupid question, but when connecting to FTP servers, there is sometimes an option for account. What is the significance of this vs the username?
See this method from the Apache FTP Client for example:
/**
* Login to the FTP server using the provided username, password,
* and account. If no account is required by the server, only
* the username and password, the account information is not used.
*
* @param username The username to login under.
* @param password The password to use.
* @param account The account to use.
* @return True if successfully completed, false if not.
* @throws FTPConnectionClosedException
* If the FTP server prematurely closes the connection as a result
* of the client being idle or some other reason causing the server
* to send FTP reply code 421. This exception may be caught either
* as an IOException or independently as itself.
* @throws IOException If an I/O error occurs while either sending a
* command to the server or receiving a reply from the server.
*/
public boolean login(final String username, final String password, final String account)
throws IOException
{
....
}
Solution 1:
The "account" is used only rarely with some specific systems, if ever at all. You will know when you need to use it. Mostly you do not. It's probably some legacy stuff. After all the FTP RFC 959 that defines the "account" feature is from 1985!
This is what FTP RFC 959 vaguely says about ACCT
(account) command:
The argument field is a Telnet string identifying the user's account. The command is not necessarily related to the USER command, as some sites may require an account for login and others only for specific access, such as storing files. In the latter case the command may arrive at any time.