GNU/Linux >> Linux の 問題 >  >> Linux

FTP は /usr/sbin/nologin ユーザーを許可しません

解決策 1:

ここから取得

Q) 助けて!ローカル ユーザーはログインできません。

A) There are various possible problems.

A1) By default, vsftpd disables any logins other than anonymous logins. Put
local_enable=YES in your /etc/vsftpd.conf to allow local users to log in.

A2) vsftpd tries to link with PAM. (Run "ldd vsftpd" and look for libpam to
find out whether this has happened or not). If vsftpd links with PAM, then
you will need to have a PAM file installed for the vsftpd service. There is
a sample one for RedHat systems included in the "RedHat" directory - put it
under /etc/pam.d

A3) If vsftpd didn't link with PAM, then there are various possible issues. Is
the user's shell in /etc/shells? If you have shadowed passwords, does your
system have a "shadow.h" file in the include path?

**A4) If you are not using PAM, then vsftpd will do its own check for a valid
user shell in /etc/shells. You may need to disable this if you use an invalid
shell to disable logins other than FTP logins. Put check_shell=NO in your
/etc/vsftpd.conf.**

あなたはケース A4 です

解決策 2:

man vsftpd.conf の check_shell を見てください:

Note! This option only has an effect for non-PAM builds of vsftpd.
If disabled, vsftpd will not check /etc/shells for a valid user
shell for local logins.

Default: YES

/usr/sbin/nologin を /etc/shells に追加できます。シンプルで簡単なソリューション。

もう 1 つは、vsftpd.conf/PAM 構成を変更することです。

PAM の場合、この「auth ...」行をコメントアウトします:

$ grep shells /etc/pam.d/vsftpd
auth    required        pam_shells.so

Linux
  1. / bin/falseと/sbin/nologinの違い

  2. Linuxは複数の連続したパスセパレーター(/ home //// username /// file)をどのように処理しますか?

  3. / sbin/nologinと/bin/ falseの違いは何ですか?

  1. Vsftpdで/var/ wwwにのみFTPアクセスを制限しますか?

  2. Linux – / usr/binと/usr/sbinを/bin(gnu / linux)にマージしますか?

  3. バイナリを /bin、/sbin、/usr/bin、および /usr/sbin にインストールし、 --prefix および DESTDIR と対話します

  1. #!/usr/bin/env bash と #!/usr/bin/bash の違いは何ですか?

  2. /usr/sbin、/usr/local/sbin、/usr/local/bin の意味は何ですか?

  3. なぜ /home 以外のものを別のパーティションに入れるのですか?