+4  A: 

The function can only tell you what the FTP server returns. The FTP server, being securely coded, says it's the wrong password. There's nothing the function can do to give you a different result from what the FTP server is telling it. :-P

For FTP servers that do distinguish between invalid usernames and invalid passwords (naughty, naughty), I'm sure the function will also just return you what the server returns, which in that case could be error 12013.

Chris Jester-Young
+3  A: 

The FTP server replies the same "invalid" message no matter if you get your account nor password wrong. This is to prevent phishing out valid usernames.

Kornel Kisielewicz