2

On my home Linux, a user named toto will have its home in /home/toto.

On the system at my high school, such an user would be in /home/t/toto. I understand this is due to the configuration of LETTERHOMES in /etc/adduser.conf.

There is also a parameter there, GROUPHOMES, to organise /home with group-based subdirectories and I can see an interest in doing so.

However, using the first letter of the username seems rather strange to me as it complicates the structure for no semantics/conceptual clarity.

Why are people doing this ?

Is this related to limitations on the number of subdirectories in a directory ? Are these limitations still relevant on modern systems ?

I am asking this because I would like to be able to justify this complication to students asking about it, or to get rid of it.

  • Are you the admin of the school system? Why do you, or anyone, need to justify this to the students? After all, what business is it of theirs where their home directory is located? – muru Jul 3 at 5:21
  • 1
    I sometime serve as de facto admin as the official body responsible for computers has a nice tech guy who can deploy Debian but officially only supports Windows on a day-to-day basis. I may need to justify this because I teach computing there and my students tend to be mathematically inclined and frown upon arbitrary complications, and they like to know ! – ysalmon Jul 3 at 5:24
  • 1
    This seems a fairly silly thing to do: Change defaults, and then go hunting for justifications later (and from random strangers on the internet, no less). – muru Jul 3 at 5:30
  • 2
    So, for example, at one of my colleges this was done because (a) home directories were backed up regularly and (b) they were on NFS. So (a) could be batched, and with (b) something silly like ls -l /home wouldn't hit the NFS server with stats for a thousand directories. At another, we used even more convoluted structures (/foo/{student,fac,staff}/{course}/{year}/{name}, because so many operations were only on one of those groups (only undergrads joined in 2018, for example). – muru Jul 3 at 5:38
  • 1
    @ysalmon If an extra letter in the path to the home directories is a "complication", I suggest you teach your students to not refer to their home directories using absolute paths at all. Or, if they must, use ~ or `~user´ in the shell. – Johan Myréen Jul 3 at 6:13
1

I've already seen this structure in large International Organizations and universities.

The purpose is to avoid having thousands (or tens of thousands) of subdirs in /home, which can complicate management and (as commented by @muru and @StephaneChazelas) affect negatively the performances of the system. In fact, looking for a subdir in the home directory would require a full scan of /home. This gets even worse if the homedirs are not on the local disk but are accessed remotely via network, as is often the case in large organizations.

  • 1
    and affects performance on file systems where directories are not indexed (where for every lookup of /home/foo/bar, the huge /home directory has to be read and scanned for a foo entry. It also gets worse when NFS is involved). – Stéphane Chazelas Jul 3 at 5:57
  • Good point, hope you don't mind me adding it to the answer. – dr01 Jul 3 at 6:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.