Saturday 2nd August 2025
Today I could not login to TrueNAS WebGUI but SSH worked. I got this error message in the /var/log/middleware.log
:
base.server.ws_handler.rpc.RpcWebSocketApp object at 0x7fd24d565c10>,), **{}) @cee:{"TNLOG": {"exception": "Traceback (most recent call last):\n File \"/usr/lib/python3/dist-packages/middlewared/main.py\", line 588, in call_hook\n await fut\n File \"/usr/lib/python3/dist-packages/middlewared/plugins/auth.py\", line 1302, in check_permission\n await AuthService.session_manager.login(app, UnixSocketSessionManagerCredentials(user, authenticator))\n File \"/usr/lib/python3/dist-packages/middlewared/plugins/auth.py\", line 144, in login\n raise CallError(f'Login with credentials failed: {resp.reason}')\nmiddlewared.service_exception.CallError: [EFAULT] Login with credentials failed: pututline() failed with error: No such file or directory", "type": "PYTHON_EXCEPTION", "time": "2025-08-02 01:45:02.144992"}}
According to Leo (Brave AI), there was some files missing. If you have the same problem, you can verify that these files exists and have the correct permissions:
$ ls -l /var/run/utmp /var/log/wtmp
-rw-r--r-- 1 root utmp 34176 Aug 2 09:35 /var/log/wtmp
-rw-r--r-- 1 root utmp 384 Aug 2 09:35 /var/run/utmp
Also verify that the utmp
group exists:
$ getent group utmp
utmp:x:43:
For me the /var/run/utmp
file was missing for whatever reason. When re-creating that file I could login again:
sudo touch /var/run/utmp
sudo chmod 644 /var/run/utmp
sudo chown root:utmp /var/run/utmp
sudo systemctl restart middlewared
Then I rebooted the system to make sure the problem doesn't reappear. It didn’t.