Bugzilla – Bug 679096
systemd: utmp not created
Last modified: 2012-01-06 07:28:20 UTC
Because systemd makes /var/run a tmpfs, it starts out with no files. But when /var/run/utmp does not exist, no info about currently logged in users will be recorded, which renders tools like w(1) ineffective.
utmp is created after mounting /var/run/ by: grep /.tmp /etc/tmpfiles.d/* /etc/tmpfiles.d/systemd.conf:F /var/run/utmp 0664 root utmp - /etc/tmpfiles.d/systemd.conf:f /var/log/wtmp 0664 root utmp - /etc/tmpfiles.d/systemd.conf:f /var/log/btmp 0600 root utmp - $ ls -l /var/run/utmp -rw-rw-r-- 1 root utmp 4608 Mar 14 14:08 /var/run/utmp Try running: $ systemd-tmpfiles --create it should create it and, the call to that binary should be in the systemd default setup: [ 3.897529] systemd[1]: var-run.mount changed mounting -> mounted ... [ 4.708725] systemd[1]: About to execute: \ /bin/systemd-tmpfiles --create --remove
It seems this is a result of the crash (bug #676786) - normally, /var/run shows 28 entries for me, though there are much less in it (IIRC less than half that) when the crash occured. (I think it may be reproduced by intentionally crashing systemd after getty has been started to provide a login prompt.) *** This bug has been marked as a duplicate of bug 676786 ***