Long usernames in FreeBSD
FreeBSD has a 16-character limit on usernames its syscalls and utilities can handle (see problem report 133926). In many cases that limit is not sufficient. If you ever played with NSS you can easily store usernames longer than 16 chars, however some syscalls such as setlogin will return an error, causing ssh login to fail.
Nov 7 02:04:12 www sshd[82095]: setlogin(bob @office.domain.tld): Invalid argument
Solution is to rebuild world and kernel with the following modifications:
/usr/src/sys/sys/param.h (set MAXLOGNAME to a higher value, for me 64 was enough)
/usr/src/include/utmp.h (set UT_NAMESIZE to the value of MAXLOGNAME + 1)
After a reboot you should be able so use longer usernames in most cases.
Posted 2009/11/09 02:00 by jos
Comments
← Separate your users from each other using FreeBSD MAC UFS quotas in jails →

Rolex GMT rep watches Says:
I really like this article, my English is not very good, but hope to communicate with you. Thank you for the article
Gucci watches for wife Says:
This article is really good, very appealing. Hope I can talk to you, thank you for your articles