Managing FTP accounts on a CentOS system involves inspecting the configuration files and user lists associated with your FTP server software. Common FTP servers on CentOS include vsftpd, proftpd, and pure-ftpd. Below are the steps to check user accounts for each of these servers.

1. vsftpd

vsftpd (Very Secure FTP Daemon) is a widely used FTP server for Unix-like systems.

Checking User Accounts

  1. Local Users: If your FTP server is configured to allow local system users to log in, list these users by inspecting the /etc/passwd file:
    cat /etc/passwd
    
  2. Virtual Users: If virtual users are configured, they might be defined in a separate file. Look for the user_config_dir in the vsftpd configuration to find this file:
    grep -i "user_config_dir" /etc/vsftpd/vsftpd.conf
    
  3. Anonymous Users: If anonymous FTP is enabled, you can verify this in the configuration file /etc/vsftpd/vsftpd.conf by finding the following line:
    anonymous_enable=YES
    

Configuration Files

  • Main configuration file:
    /etc/vsftpd/vsftpd.conf
    

2. proftpd

proftpd is another popular FTP server.

Checking User Accounts

  1. Local Users: Similar to vsftpd, check the local users in the /etc/passwd file:
    cat /etc/passwd
    
  2. Virtual Users: Virtual users might be stored in a separate file or database. Look for AuthUserFile or similar directives in the proftpd configuration:
    grep -i "AuthUserFile" /etc/proftpd/proftpd.conf
    

Configuration Files

  • Main configuration file:
    /etc/proftpd/proftpd.conf
    

3. pure-ftpd

pure-ftpd is a lightweight FTP server.

Checking User Accounts

  1. Local Users: As with the other servers, check /etc/passwd for local users:
    cat /etc/passwd
    
  2. Virtual Users: Virtual users for pure-ftpd might be managed using a separate file or database. Check the pure-ftpd configuration for details.

Configuration Files

  • Main configuration file:
    /etc/pure-ftpd/pure-ftpd.conf
    

Additional Tips

  • Service Management: To check if the FTP service is running, you can use:
    systemctl status vsftpd
    systemctl status proftpd
    systemctl status pure-ftpd
    
  • User-Specific Configurations: FTP servers may have user-specific settings in separate directories, such as /etc/vsftpd/user_conf/ for vsftpd.
  • Logs: Reviewing log files can also provide information about FTP accounts and activity:
    /var/log/vsftpd.log
    /var/log/proftpd/proftpd.log
    /var/log/pure-ftpd/pure-ftpd.log
    

By examining these files and configurations, you can gather all necessary information about the FTP accounts configured on your CentOS system.