Задания Cron перестали работать из-за PAM

https://en.wikipedia.org/wiki/SIGHUP

1. ¿Cómo es beneficioso que el proceso no tenga una terminal asociada?

On POSIX-compliant platforms, SIGHUP ("signal hang up") is a signal sent to a process when its controlling terminal is closed. (It was originally designed to notify the process of a serial line drop.)

[...]

The default action [of SIGHUP] on POSIX-compliant systems is an abnormal termination.


Si entiendo bien la situación, son dos casos diferentes.

El caso obvio es que si cierra, p. un emulador de terminal como GNOME Terminal o mc, que cierra el extremo maestro de un pseudo dispositivo terminal -. Y este cierre genera un cuelgue en el pseudo terminal -. Esto afecta al dispositivo esclavo. Todos los procesos que son controlados por este terminal recibirán SIGHUP. Este no es el caso descrito anteriormente.

@JDePB señala el segundo caso :si cierra todos los descriptores de archivo que hacen referencia a un dispositivo terminal, también generará un bloqueo. Es decir, si su daemon cierra su FD para su tty (que debería ), y luego los otros procesos que tienen abiertos FD de la salida tty, su daemon recibirá SIGHUP, incluso si su emulador de terminal no lo hace. t responde y deja abierto el extremo maestro del pseudo terminal -. Esta funcionalidad se puede deshabilitar para todo el dispositivo terminal borrando HUPCL .

También hay vhangup(). Parece que loginllama a esto para intentar asegurarse de que la sesión anterior no pueda interferir con ella. O algo. No lo tengo del todo claro, ya que esta llamada es específica de Linux -y la página del manual es muy, muy corta.

2. ¿Y es un hijo directo de init?

If the process receiving SIGHUP is a Unix shell, then as part of job control it will often intercept the signal and ensure that all stopped processes are continued before sending the signal to child processes (more precisely, process groups, represented internally by the shell as a "job"), which by default terminates them.

0
27.06.2019, 15:34
2 ответа

Мне удалось решить проблему. Это связано с файлом с именем /lib/libgrubd.so .

Если у вас возникла эта проблема, проверьте /etc/ld.so.preload . Если этот файл содержит /lib/libgrubd.so (, это может быть единственная строка в этом файле ), тогда удалите эту строку, и PAM снова начнет работать. Я также удалил файл /lib/libgrubd.so из системы, поскольку он может быть связан с вирусом, как показано здесь .

До сих пор не совсем понятно, что вызвало проблему, но это было причиной неправильной работы PAM. Подробнее см. здесь .

1
28.01.2020, 02:30

Я только что столкнулся с той же проблемой. Мне говорят вот что:

I regret to inform you that this server is compromised at the root level by malware known as ShellBot. This malware is known to cause errors when running the "crontab" command but can potentially cause many other problems including not being able to start certain services.

The presence of /lib/libgrubd.so (which is not normally found on clean systems) is an indication of this malware. This malware is installed in a way that causes it to execute every time a program is run on the server, and can potentially cause aberrant behavior of any process.

1
28.01.2020, 02:30

Теги

Похожие вопросы