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

  1. May 10, 08:12 AM

    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

  2. May 17, 11:25 AM

    Gucci watches for wife Says:

    This article is really good, very appealing. Hope I can talk to you, thank you for your articles

Leave a Comment

Add your comment. Preview then Submit.


Hidden


Textile Help