GNU/Linux >> LINUX-Kenntnisse >  >> Linux

FTP lässt den Benutzer /usr/sbin/nologin nicht zu

Lösung 1:

Entnommen von hier

F) Hilfe! Lokale Benutzer können sich nicht anmelden.

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

Sie sind Fall A4

Lösung 2:

Schauen Sie sich check_shell in man vsftpd.conf an:

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

Sie können /usr/sbin/nologin zu /etc/shells hinzufügen. Einfache und einfache Lösung.

Eine andere Möglichkeit besteht darin, die vsftpd.conf/PAM-Konfiguration zu ändern.

Kommentieren Sie diese "auth ..."-Zeile im PAM-Fall aus:

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

Linux
  1. Wie behandelt Linux mehrere aufeinanderfolgende Pfadtrennzeichen (/home////username///file)?

  2. Was ist der Unterschied zwischen /sbin/nologin und /bin/false?

  3. Beschränken Sie den FTP-Zugriff nur auf /var/www mit Vsftpd?

  4. Linux – Zusammenführen von /usr/bin und /usr/sbin in /bin (gnu/linux)?

  5. Anzeigen von Systembenutzern in Linux

Linux-Cut-Befehl mit praktischen Beispielen

Linux – /sbin/init existiert nicht?

Installieren Sie Binärdateien in /bin, /sbin, /usr/bin und /usr/sbin, Interaktionen mit --prefix und DESTDIR

Was bedeuten /usr/sbin, /usr/local/sbin und /usr/local/bin?

Warum andere Dinge als /home auf eine separate Partition legen?

Warum ist chroot_local_user von vsftpd unsicher?