GNU/Linux >> Belajar Linux >  >> Linux

FTP tidak mengizinkan pengguna /usr/sbin/nologin

Solusi 1:

Diambil dari sini

Q) Tolong! Pengguna lokal tidak dapat masuk.

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.**

Anda adalah Kasus A4

Solusi 2:

Lihat check_shell di man vsftpd.conf:

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

Anda dapat menambahkan /usr/sbin/nologin ke /etc/shells. Solusi sederhana dan mudah.

Cara lainnya adalah mengubah konfigurasi vsftpd.conf/PAM.

Komentari baris "auth ..." ini dalam kasus PAM:

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

Linux
  1. Informasi GECOS Linux dirahasiakan

  2. /usr/bin Vs /usr/local/bin Di Linux?

  3. Apa Perbedaan Antara /sbin/nologin Dan /bin/false?

  1. Batasi Akses Ftp Hanya Ke /var/www Dengan Vsftpd?

  2. Linux – Menggabungkan /usr/bin Dan /usr/sbin Ke /bin (gnu/linux)?

  3. Instal binari ke /bin, /sbin, /usr/bin dan /usr/sbin, interaksi dengan --prefix dan DESTDIR

  1. Apa perbedaan antara #!/usr/bin/env bash dan #!/usr/bin/bash?

  2. Kapan saya harus menggunakan /dev/shm/ dan kapan saya harus menggunakan /tmp/?

  3. Mengapa meletakkan hal-hal selain /home ke partisi terpisah?