News for hackers. Stuff that matters.
Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by kristopolous on Sunday December 24, 2023 @05:13PM (#38757460)
/usr was initially for users. See Kernighan's Unix for beginniners from 1974: https://archive.org/details/unix-for-beginners/page/n5/mode/... or this 1982 text from Bell Labs: https://archive.org/details/unixsystem0000bour/page/10/mode/...

Even in 1994 this was still common, https://archive.org/details/learningunix0000gard/page/48/mod...

Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by derefr on Sunday December 24, 2023 @05:23PM (#38757563)
Interesting. I guess 1974 was before "distributions" like BSD even existed, when the OEM bring-up tape was the only OS tape.

But why does Kernighan, on that same page, mention /usr/bin already being a thing? If /usr is what we would today call /home, why does it have a bin subdir?

Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by kristopolous on Sunday December 24, 2023 @05:31PM (#38757641)
$ cat /etc/passwd

Look at row #3.

Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by derefr on Sunday December 24, 2023 @05:43PM (#38757759)
That only moves the question back a step. Why have a bin user that owns all the userland binaries and keeps them directly under its own home directory? What does that accomplish? Something to do with per-user quotas? Or making `ln /usr/bob/a.out /usr/bin/newcmd` cheap?

I note that there's also a bin group. Was /usr/bin mode 1775, and anyone who should be allowed to install binaries (and update/remove their own installed binaries) was made a member of the bin group?

Also, I note that there's no sbin user. (There is, however, a sys user. But only on Linux, not on BSD...)

Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by kristopolous on Sunday December 24, 2023 @06:12PM (#38757959)
sbin is a SYSVR4'ism ... it's complicated. /etc had a bunch of binaries in it like fsck. MACH systems had that as well (well technically it was linked to /private/etc which then linked the binaries to /usr/etc - here's an openstep screenshot I just took: http://9ol.es/usr-etc.png). It's /etc/mkfs /etc/route ... they got moved to /usr/sbin/ and /sbin in R4 - by then, SYSV systems were using /home and the initial purity of every owner of every process being an equivalent class user had been broken by pragmatism.

The invention of /sbin/ /usr/sbin is all R4, see https://archive.org/details/unixsystemvrelea0000unse_t8i3/pa...

Unix 1980s history is a complicated mess ... that's why there were multiple conflicting standards groups that tried to fix it. The X/Open group had the "single unix specification" which is different from POSIX and say, the Open software foundation (which did OSF/1). Here's a nice crash course: https://en.wikipedia.org/wiki/Single_UNIX_Specification

Explaining the history with the motivations is probably around 10,000 words. AFAIK it hasn't been written. I'd be one of the handful of wackos who'd actually do that and I haven't seen it.

Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by db48x on Sunday December 24, 2023 @08:44PM (#38758807)
It let them add a second hard drive after the first one filled up (5MB each, as I recall).
Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by derefr on Tuesday December 26, 2023 @02:42PM (#38775268)
You misunderstand. My question was why they bothered to make a real "bin" user to have /usr/bin as its homedir; when, if it had just been purely an issue of shoving some binaries over to the /usr drive, they could have just created a /usr/bin owned by root:root and leave it there; or, if they really cared, created a /usr/root for "a secondary root-user homedir that lives on the /usr drive" and then made a /usr/root/bin.
Re:Fedora 40 Plans To Unify /usr/bin and /usr/sbin by db48x on Tuesday December 26, 2023 @08:11PM (#38777932)
That I don’t know. My guess is that it came later, so that no new user could be called “bin” and thus inherit ownership of those files. There are some historical sources that might shed light on the matter, but someone would have to do some work.