Ubuntu下安裝ProFTPD小結(jié)
Ubuntu下安裝ProFTPD小結(jié):在Ubuntu Linux上安裝了ProFTPD,總結(jié)了一下自己的安裝過(guò)程。
1. 配置運(yùn)行ProFTPD的方法
- ServerType inetd
- # Set the user and group that the server normally runs at.
- User nobody
- Group nobody
如果ServerType選擇了inetd,/etc/init.d/proftpd start,就會(huì)報(bào)錯(cuò),因?yàn)槟氵x擇了inetd運(yùn)行。
ProFTPd warning: cannot start neither in standalone nor in inetd/xinetd mode. Check your configuration.
若要手動(dòng)執(zhí)行ProFTPD, 要把 ServerType 設(shè)成 standalone才行。
2. NIS認(rèn)證
/etc/nsswitch.conf 必須有nis服務(wù)
- # Users require a valid shell listed in /etc/shells to login.
- # Use this directive to release that constrain.
- # RequireValidShells off
必須把NIS Sever傳過(guò)來(lái)的shell信息/usr/local/bin/bash,放在/etc/shells列表才行,否則視為invalid shell。
另外,也可以在/etc/passwd文件中的對(duì)應(yīng)shell的那個(gè)field直接進(jìn)行修改為/bin/bash,則忽略遠(yuǎn)端傳過(guò)來(lái)的shell信息。
還有一個(gè)很重要的設(shè)置,
- # Uncomment this if you are using NIS or LDAP to retrieve passwords:
- PersistentPasswd off
PersistentPasswd 如果設(shè)置為on,就只檢查/etc/passwd里面的user account,不要用uncomment,要用上述語(yǔ)句,切記!
3. xinet啟動(dòng)ProFTPD
- # Set the user and group that the server normally runs at.
- User root
- Group root
建立/etc/xinetd.d/proftpd,然后編輯如下內(nèi)容。
- service ftp
- {
- disable = no
- flags =REUSE
- socket_type = stream
- wait = no
- user = root
- server = /usr/sbin/proftpd
- server_args = -c /etc/proftpd/proftpd.conf
- log_on_success += DURATION USERID
- log_on_failure += USERID
- }
保存之后,chmod +x proftpd。
這樣Ubuntu下安裝ProFTPD小結(jié)就大功告成了,大家學(xué)習(xí)得如何呢?
【編輯推薦】