vsftpd
Розбіжності
Тут показані розбіжності між вибраною ревізією та поточною версією сторінки.
| vsftpd [2013/09/20 10:50] – створено wombat | vsftpd [2015/12/17 12:02] (поточний) – Clean Formatting wombat | ||
|---|---|---|---|
| Рядок 1: | Рядок 1: | ||
| - | # db_load -T -t hash -f virtual-users.txt / | + | |
| 2. Virtual users and authentication | 2. Virtual users and authentication | ||
| Рядок 6: | Рядок 6: | ||
| We are going to use pam_userdb to authenticate the virtual users. This needs a username / password file in `db’ format – a common database format. We need `db_load’ program. For CentOS, Fedora, you may install the package `db4-utils’: | We are going to use pam_userdb to authenticate the virtual users. This needs a username / password file in `db’ format – a common database format. We need `db_load’ program. For CentOS, Fedora, you may install the package `db4-utils’: | ||
| - | # yum install db4-utils | + | |
| For Ubuntu, | For Ubuntu, | ||
| - | # apt-get install db4.2-util | + | |
| To create a `db’ format file, first create a plain text file `virtual-users.txt’ with the usernames and passwords on alternating lines: | To create a `db’ format file, first create a plain text file `virtual-users.txt’ with the usernames and passwords on alternating lines: | ||
| - | mary | + | |
| - | 123456 | + | 123456 |
| - | jack | + | jack |
| - | 654321 | + | 654321 |
| Then execute the following command to create the actual database: | Then execute the following command to create the actual database: | ||
| - | # db_load -T -t hash -f virtual-users.txt / | + | |
| Now, create a PAM file / | Now, create a PAM file / | ||
| - | auth required pam_userdb.so db=/ | + | |
| - | account required pam_userdb.so db=/ | + | account required pam_userdb.so db=/ |
| 3. Configuration of VSFTPD | 3. Configuration of VSFTPD | ||
| Рядок 32: | Рядок 32: | ||
| Create a configuration file / | Create a configuration file / | ||
| + | <file " | ||
| # disables anonymous FTP | # disables anonymous FTP | ||
| anonymous_enable=NO | anonymous_enable=NO | ||
| Рядок 64: | Рядок 65: | ||
| # the umask for file creation | # the umask for file creation | ||
| local_umask=022 | local_umask=022 | ||
| + | </ | ||
| 4. Creation of home directories | 4. Creation of home directories | ||
| Рядок 69: | Рядок 71: | ||
| Create each user’s home directory in / | Create each user’s home directory in / | ||
| - | # mkdir / | + | |
| - | # chown ftp:ftp / | + | # chown ftp:ftp / |
| 5. Startup of VSFTPD and test | 5. Startup of VSFTPD and test | ||
| Now we can start VSFTPD by the command: | Now we can start VSFTPD by the command: | ||
| - | # / | + | |
| and test the FTP access of a virtual user: | and test the FTP access of a virtual user: | ||
| - | # lftp -u mary -p 60021 192.168.1.101 | + | |
| [[https:// | [[https:// | ||
vsftpd.1379674235.txt.bz2 · Востаннє змінено: (зовнішнє редагування)
