[Toybox] [PATCH] Fix truncate.test for macOS.

Rob Landley rob at landley.net
Mon Jul 4 23:10:57 PDT 2022


On 7/5/22 00:45, Rob Landley wrote:
>> wouldn't it make more sense to use one of the low-numbered groups that's the
>> same on both though, rather than skip?
> 
> Grrr... trusting "root" to be there seemed as universal as you could get.
> Slowaris had "root". AIX had "root". I very vaguely recall Eunice on the VAX
> _thinking_ it had "root" although I was something like thirteen years old at the
> time so it's anybody's guess whether that's accurate. (I don't remember what my
> Uncle Alan's HP minicomputer in his den had when I was 7, I was just playing
> hangman on the teletype. Yes, actual printer.)

I see the problem. The /etc/passwd file already existed in 1972, but /etc/group
didn't yet:

http://ftp.fibranet.cat/UnixArchive/Distributions/Research/1972_stuff/Readme

In Dennis Ritche's Unix v6 filesystem tarball
(http://ftp.fibranet.cat/UnixArchive/Distributions/Research/Dennis_v6/v6root.tar.gz)
the /etc/group file hasn't got a group for root:

  $ cat etc/passwd
  root::0:3::/:
  daemon::1:1::/:
  bin::3:3::/bin:
  ken::6:1::/usr/ken:

  $ cat etc/group
  other::1:
  bin::3:root,bin

And then unix v7
(http://ftp.fibranet.cat/UnixArchive/Distributions/Research/Henry_Spencer_v7/v7.tar.gz)
had:

  $ cat etc/passwd
  root:VwL97VCAx1Qhs:0:1::/:
  daemon:x:1:1::/:
  sys::2:2::/usr/sys:
  bin::3:3::/bin:
  uucp::4:4::/usr/lib/uucp:/usr/lib/uucico
  dmr::7:3::/usr/dmr:

  $ cat etc/group
  other::1:
  sys::2:bin,sys
  bin::3:sys,bin
  uucp::4:

Alright, now I'm curious, what did Red Hat 1.0 from 1995
(https://archive.download.redhat.com/pub/redhat/linux/1.0/en/os/i386/rootdisks/rootdisk.img.gz)
have:

  $ cat etc/passwd
  root::0:0:root:/root:/bin/bash
  bin:*:1:1:bin:/bin:
  daemon:*:2:2:daemon:/sbin:
  adm:*:3:4:adm:/var/adm:
  lp:*:4:7:lp:/var/spool/lpd:
  sync:*:5:0:sync:/sbin:/bin/sync
  shutdown:*:6:0:shutdown:/sbin:/sbin/shutdown
  halt:*:7:0:halt:/sbin:/sbin/halt
  mail:*:8:12:mail:/var/spool/mail:
  news:*:9:13:news:/var/spool/news:
  uucp:*:10:14:uucp:/var/spool/uucp:
  operator:*:11:0:operator:/root:/bin/bash
  games:*:12:100:games:/usr/local/games:
  nobody:*:99:99:Nobody:/:

  $ cat etc/group
  root::0:root
  bin::1:root,bin,daemon
  daemon::2:root,bin,daemon
  sys::3:root,bin,adm
  adm::4:root,adm,daemon
  tty::5:
  disk::6:root
  lp::7:daemon,lp
  mem::8:
  kmem::9:
  wheel::10:root
  mail::12:mail
  news::13:news
  uucp::14:uucp
  man::15:
  games::20:
  dip::40:
  nobody::99:
  users::100:

So yes root:root, but it also had "wheel" as group #10.

I'll stop now.

Rob


More information about the Toybox mailing list