Subscribe to the RSS Feed

 

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

Leave a Comment

Add your comment. Preview then Submit.


Hidden


Textile Help