我如何在FreeBSD中创build一个仅限FTP的帐户?

我创build了一个仅用于FTP会话的帐户:

# adduser Username: test Full name: Uid (Leave empty for default): Login group [test]: Login group is test. Invite test into other groups? []: Login class [default]: Shell (sh csh tcsh bash rbash nologin) [sh]: nologin Home directory [/home/test]: Home directory permissions (Leave empty for default): Use password-based authentication? [yes]: Use an empty password? (yes/no) [no]: Use a random password? (yes/no) [no]: Enter password: Enter password again: Lock out the account after creation? [no]: Username : test Password : ***** Full Name : Uid : 1002 Class : Groups : test Home : /home/test Home Mode : Shell : /usr/sbin/nologin Locked : no OK? (yes/no): yes adduser: INFO: Successfully added (test) to the user database. Add another user? (yes/no): no Goodbye! 

但是,当我尝试login帐户时,我收到消息:

 530 User test access denied. Login failed. 

用户的shell必须位于/ etc / shells中。 我想在你的configuration/ usr / sbin / nologin不会在这个文件中出现。 把用户的shell改为fe / usr / bin / passwd(首先确保它在/ etc / shells中),它应该可以工作。