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

ユーザーが ftp 経由で vsftpd サーバーにログインすると、エラー「530:許可が拒否されました」

問題

vsftp サーバーが新しくインストールされ、起動されましたが、特定のユーザーがアクセスできず、以下に示すエラーが表示されます。

# service vsftpd status
vsftpd (pid 5806) is running...
# ftp localhost
Connected to localhost.localdomain.
220 (vsFTPd 2.0.5)
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (localhost:oracle): user
530 Permission denied.
Login failed.

解決策

原因は、パラメータ userlist_enable ファイル /etc/vsftpd/vsftpd.confはい パラメータ userlist_deny デフォルト値も YES です 、次にファイル /etc/vsftpd/user_list のユーザー名 「530 許可が拒否されました」が表示されます ' エラーが発生し、パスワードの入力も求められません。

パラメータ userlist_enable が有効な場合、vsftpd はファイル /etc/vsftpd/userlist_file にユーザー名をロードします。ユーザーがこのファイル内の名前を使用してログインしようとすると、パスワードを要求される前に拒否されます。これは、クリアテキストのパスワードが送信されるのを防ぐのに役立つ場合があります。

userlist_enable がアクティブ化されている場合、パラメーター userlist_deny が検査されます。この設定を NO に設定すると、ユーザーはファイル /etc/vsftpd/userlist_file にリストされている場合にログインを許可されます。

注意 :セキュリティ上の理由から、この問題は /etc/vsftpd/vsftpd.conf で「userlist_enable=NO」を設定することによっても解決できるため、userlist_enable を「YES」に設定する必要があります。

userlist_deny を設定することで、この問題を解決できます。 いいえ userlist_enable がアクティブ化されたとき。次に、許可されたユーザー名をファイル /etc/vsftpd/user_list に入れ、許可されていないユーザー名をファイル /etc/vsftpd/ftpusers に入れます。

vsftpd.conf のマニュアルから説明を見ることができます。

$ man  vsftpd.conf
userlist_deny
              This  option  is  examined if userlist_enable is activated. If you set this setting to NO, then users will be
              denied login unless they are explicitly listed in the file specified by userlist_file.  When login is denied,
              the denial is issued before the user is asked for a password.

userlist_enable
              If  enabled, vsftpd will load a list of usernames, from the filename given by userlist_file.  If a user tries
              to log in using a name in this file, they will be denied before they are asked for a password.  This  may  be
              useful in preventing cleartext passwords being transmitted. See also userlist_deny.

              Default: NO

これらのコメントは、ファイル /etc/vsftpd/user_list でも確認できます。

# vsftpd userlist
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers
# for users that are denied.

VSFTP サーバーのローカル ユーザーにログインを許可する

1. /etc/vsftpd/vsftpd.conf を編集します userlist_enable を設定します はいに と userlist_deny いいえ .

# vi /etc/vsftpd/vsftpd.conf
userlist_enable=YES
userlist_deny=NO

2. /etc/vsftpd/user_list を変更します 、ログインを許可されているユーザー (user01) をこのファイルに入れます

# cat  /etc/vsftpd/user_list
user01

3. ftp を許可されていないすべてのユーザーを /etc/vsftpd/ftpusers に配置します。 .

# cat ftpusers
# Users that are not allowed to login via ftp
root
bin
daemon
adm
lp
sync
shutdown
halt
mail
news
uucp
operator
games
nobody

4. vsftpd サービスを再起動します。

# service vsftpd restart

5. ユーザー user01 で ftp を再試行します。

$ ftp localhost
Connected to localhost.localdomain.
220 (vsFTPd 2.0.5)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (localhost:root): user01
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

6. root などの許可されていないユーザー ID によるログインも試してください。

# ftp localhost
Connected to localhost.localdomain.
220 (vsFTPd 2.0.5)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (localhost:root): root
530 Permission denied.
Login failed.
ftp>
CentOS / RHEL :ユーザーが VSFTP サーバーにログインすることを許可または拒否する方法


Linux
  1. SSH経由でrootユーザーのログインを無効にする方法

  2. RaspberryPiでvsFTPdを使用してFTPサーバーをセットアップする

  3. CentOSクラウドサーバーにVSFTPDをインストールする方法

  1. docker.sock 許可が拒否されました

  2. authorized_key ファイルで許可が拒否されました

  3. /var/www/html への filezilla sftp 経由の書き込み許可が拒否されました

  1. archlinux で X サーバーをセットアップする際の startx エラー

  2. マウント エラー 13 =許可が拒否されました

  3. ローカルの Ubuntu から Amazon EC2 サーバーに SSH 接続しようとすると、許可が拒否されました (公開鍵) が表示されるのはなぜですか?