Bug 679096 - systemd: utmp not created
Summary: systemd: utmp not created
Status: VERIFIED DUPLICATE of bug 676786
Alias: None
Product: openSUSE 11.4
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Final
Hardware: All Linux
: P5 - None : Minor (vote)
Target Milestone: ---
Assignee: Kay Sievers
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-12 07:40 UTC by Jan Engelhardt
Modified: 2012-01-06 07:28 UTC (History)
0 users

See Also:
Found By: Beta-Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Engelhardt 2011-03-12 07:40:14 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.
Comment 1 Kay Sievers 2011-03-14 13:18:20 UTC
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
Comment 2 Jan Engelhardt 2011-03-14 23:53:11 UTC
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 ***