GNU/Linux >> Tutoriales Linux >  >> Linux

FTP no permite el usuario /usr/sbin/nologin

Solución 1:

Tomado de aquí

P) ¡Ayuda! Los usuarios locales no pueden iniciar sesión.

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

Eres Caso A4

Solución 2:

Mire check_shell en 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

Puede agregar /usr/sbin/nologin a /etc/shells. Solución simple y fácil.

Otra es cambiar la configuración de vsftpd.conf/PAM.

Comente esta línea "auth..." en el caso de PAM:

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

Linux
  1. Conflictos de Node.js:/sbin/node Vs /usr/bin/node?

  2. Visualización de usuarios del sistema en Linux

  3. Instalar binarios en /bin, /sbin, /usr/bin y /usr/sbin, interacciones con --prefix y DESTDIR

  4. ¿Cuál es la diferencia entre #!/usr/bin/env bash y #!/usr/bin/bash?

  5. ¿Cuáles son los significados de /usr/sbin, /usr/local/sbin y /usr/local/bin?

Comando de corte de Linux con ejemplos prácticos

Diferencia entre /bin/falso y /sbin/nologin

/usr/bin Vs /usr/local/bin ¿En Linux?

Linux:¿/sbin/init no existe?

¿Cuándo debo usar /dev/shm/ y cuándo debo usar /tmp/?

¿Por qué el chroot_local_user de vsftpd es inseguro?