Frequently Asked Questions for FreeBSD 2.X : Miscellaneous Questions : Why are login names still restricted to 8 characters?
Previous: Why won't chmod change the permissions on symlinks?
Next: Can I run DOS binaries under FreeBSD?

12.5. Why are login names still restricted to 8 characters?

You'd think it'd be easy enough to change UT_NAMESIZE and rebuild the whole world, and everything would just work. Unfortunately there are often scads of applications and utilities (including system tools) that have hard-coded small numbers (not always "8" or "9", but oddball ones like "15" and "20") in structures and buffers. Not only will this get you log files which are trashed (due to variable-length records getting written when fixed records were expected), but it can break Sun's NIS clients and potentially cause other problems in interacting with other UNIX systems.

In FreeBSD 3.0 and later, the maximum name length has been increased to 16 characters and those various utilities with hard-coded name sizes have been found and fixed. The fact that this touched so many areas of the system is why, in fact, the change was not made until 3.0.

If you're absolutely confident in your ability to find and fix these sorts of problems for yourself when and if they pop up, you can increase the login name length in earlier releases by editing /usr/include/utmp.h and changing UT_NAMESIZE accordingly. You must also update MAXLOGNAME in /usr/include/sys/param.h to match the UT_NAMESIZE change. Finally, if you build from sources, don't forget that /usr/include is updated each time! Change the appropriate files in /usr/src/.. instead.


Frequently Asked Questions for FreeBSD 2.X : Miscellaneous Questions : Why are login names still restricted to 8 characters?
Previous: Why won't chmod change the permissions on symlinks?
Next: Can I run DOS binaries under FreeBSD?