[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bullseye - who and users return nothing



On Tue, Jan 25, 2022 at 01:31:35AM +0000, Gareth Evans wrote:
> /var/run$ sudo touch utmp
> /var/run$ sudo chown root:utmp utmp
> /var/run$ sudo chmod 664 utmp
> /var/run$ ls -l utmp
> -rw-rw-r-- 1 root utmp 0 Jan 25 00:08 utmp
> /var/run$ who
> /var/run$
> [logout, login]
> /var/run$ ls -l /var/run/utmp
> -rw-rw-r-- 1 root utmp 384 Jan 25 00:17 /var/run/utmp
> $ who
> user     tty7         2022-01-25 00:17 (:0)
> $ sudo reboot
> ...
> $ ls -l /var/run/utmp
> ls: cannot access '/var/run/utmp': No such file or directory

A google search led me to <https://bugs.archlinux.org/task/47749>
which says that the /run/utmp file is supposed to be created by
"tmpfiles", specifically by the instructions in the configuration
file /usr/lib/tmpfiles.d/systemd.conf .

On my system, /usr/lib/tmpfiles.d/systemd.conf contains this line:

F! /run/utmp 0664 root utmp -

Does your system have this file, and if so, does it contain that line?


Reply to: