users: /dev/null/utmp: Not a directory
Command users does not work:
# which users /usr/bin/users # users users: /dev/null/utmp: Not a directory
#4 Updated by Dennis Przytarski over 4 years ago
Not only utmp, also wtmp.
# which last /usr/bin/last # last -v BusyBox v1.22.1 (2014-08-06 12:27:59 GMT) multi-call binary. Usage: last Show listing of the last users that logged into the system # last last: can't open '/dev/null/wtmp': Not a directory
#13 Updated by Chris Spillane over 3 years ago
What's the actual cause of this issue? Some of the information I have read suggests it is because musl does not use or even support /dev/null/utmp or /dev/null/wtmp (and nothing appears to get written to /var/log/wtmp); so I guess there might not be a way to fix this.
If there is a way around this, it would be good to get it patched since "last" and "who" and "users" etc are pretty essential.
Otherwise maybe we can figure some kind of workaround.
#15 Updated by Natanael Copa over 3 years ago
- Target version changed from 3.3.0 to 3.4.0
problem is that musl libc has not implemented utmp.
#20 Updated by Will Dietz about 1 year ago
- File 168rwi3wbnhb1zwwcjb7mprbqci31qag-gistfile1.diff 168rwi3wbnhb1zwwcjb7mprbqci31qag-gistfile1.diff added
William Pitcock wrote:
I was also seeing this with screen. We may need to patch musl here to make the utmp stub better.
screen can be built without assuming utmp support, which seems appropriate for musl.
This patch,originally meant for use on Darwin, seems to do the trick for me (and passes quick inspection):
(Attaching as well so it's not lost)
Hope this helps!