Project

General

Profile

Bug #3282

users: /dev/null/utmp: Not a directory

Added by Dennis Przytarski over 4 years ago. Updated 27 days ago.

Status:
New
Priority:
High
Assignee:
-
Category:
-
Target version:
Start date:
08/11/2014
Due date:
% Done:

0%

Estimated time:
Security IDs:

Description

Command users does not work:

# which users
/usr/bin/users

# users
users: /dev/null/utmp: Not a directory
Screen Shot 2015-04-20 at 21.34.35.png (10.2 KB) Screen Shot 2015-04-20 at 21.34.35.png Dennis Przytarski, 04/20/2015 07:34 PM
168rwi3wbnhb1zwwcjb7mprbqci31qag-gistfile1.diff (748 Bytes) 168rwi3wbnhb1zwwcjb7mprbqci31qag-gistfile1.diff screen-no-utmp.diff Will Dietz, 01/23/2018 09:24 PM

History

#1 Updated by Natanael Copa over 4 years ago

  • Target version set to 3.0.4

For the record: it happens with coreutils. not busybox.

#2 Updated by William Pitcock over 4 years ago

I was also seeing this with screen. We may need to patch musl here to make the utmp stub better.

#3 Updated by Natanael Copa over 4 years ago

  • Target version changed from 3.0.4 to 3.0.5

#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

#5 Updated by Natanael Copa over 4 years ago

  • Target version changed from 3.0.5 to 3.0.6

#6 Updated by Natanael Copa over 4 years ago

  • Target version changed from 3.0.6 to 3.0.7

#7 Updated by V Krishn about 4 years ago

Few more commands with similar issues,

users, who

#8 Updated by Dennis Przytarski about 4 years ago

  • Priority changed from Normal to High
  • Affected versions 3.0.4, 3.0.5, 3.0.6, 3.1.0 added

Bug is still alive.

#9 Updated by Dennis Przytarski about 4 years ago

  • Description updated (diff)

#10 Updated by Jeff Bilyk about 4 years ago

  • Affected versions 3.1.1 added

Seeing the same issue with Alpine 3.1.1 with coreutils-8.23-r0 when trying to use 'who' and 'last'.

#11 Updated by Dennis Przytarski almost 4 years ago

Also without coreutils on Alpine Linux 3.1.3!

#12 Updated by Martin Hansen over 3 years ago

This is still an issue!

I am running with version 3.2.

$ uname -a
Linux miniserver 3.18.20-1-grsec #2-Alpine SMP Wed Aug 12 14:04:19 GMT 2015 i686 Linux

$ screen
/dev/null/utmp: Not a directory
Cannot find terminfo entry for 'xterm-256color'.

#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.

#14 Updated by Dennis Przytarski over 3 years ago

  • Target version changed from 3.0.7 to 3.3.0
  • Affected versions 3.1.2, 3.1.4, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4 added

#15 Updated by Natanael Copa about 3 years ago

  • Target version changed from 3.3.0 to 3.4.0

#16 Updated by Natanael Copa over 2 years ago

  • Target version changed from 3.4.0 to 3.5.0

#17 Updated by Natanael Copa about 2 years ago

  • Target version changed from 3.5.0 to 3.6.0

#18 Updated by Carlo Landmeter over 1 year ago

  • Target version changed from 3.6.0 to 3.7.0

#19 Updated by Natanael Copa about 1 year ago

  • Target version changed from 3.7.0 to 3.8.0

#20 Updated by Will Dietz about 1 year ago

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):

https://gist.githubusercontent.com/yujinakayama/4608863/raw/76b9f89af5e5a2e97d9a0f36aac989fb56cf1447/gistfile1.diff

(Attaching as well so it's not lost)

Hope this helps!

~Will

#21 Updated by Carlo Landmeter 8 months ago

  • Target version changed from 3.8.0 to 3.9.0

#22 Updated by Joey Smith 6 months ago

How about bundling utmps ? It seems to address the concerns musl calls out. It would require a newer version of skalibs and some parts of s6…

#23 Updated by Natanael Copa 27 days ago

  • Target version changed from 3.9.0 to 3.10.0

Also available in: Atom PDF