Username length restriction in FreeBSD.

4 posts / 0 new
Last post
#1 Thu, 03/05/2009 - 03:52

Username length restriction in FreeBSD.

Hi guys,

I'm aware of limitation described here -,freebsd_installation_and_conf.... However I've recompiled the world and kernel as described in adduser(8). Now, in the system I'm able to create users with username up to 128 characters:



Username: Full name: Uid (Leave empty for default): Login group []: Login group is Invite into other groups? []: Login class [default]: Shell (sh csh tcsh bash rbash false scponly nologin nologin) [sh]: Home directory [/home/]: Home directory permissions (Leave empty for default): Use password-based authentication? [yes]: Use an empty password? (yes/no) [no]: yes Lock out the account after creation? [no]: Username : Password : <blank> Full Name : Uid : 10000 Class : Groups : Home : /home/ Home Mode : Shell : /bin/sh Locked : no OK? (yes/no): yes adduser: INFO: Successfully added ( to the user database. Add another user? (yes/no): no Goodbye! #


Normal work in the system is even possible;-)

[code:1] $ ssh -Cl x.x.x.x
Password: Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 The Regents of the University of California. All rights reserved.

FreeBSD 7.1-RELEASE-p3 (xxx) #1: Wed Mar 4 11:02:15 CET 2009 $ id uid=10000( gid=10000( groups=10000( $


The problem is, that Virtualmin has some inbuild value for maximum username length in FreeBSD. I've tried to modify "/usr/local/webmin/useradmin/config-freebsd" by setting "max_length" variable to "128" but it didn't help. When creating new virtual server, Virtualmin halts with the following error:

[code:1] Failed to create virtual server : The username is not valid : Username cannot be longer than 16 letters Call Stack Trace File Line Function /usr/local/webmin/virtual-server/domain_setup.cgi 129 virtual_server::error (eval 84) 6 (eval) /usr/local/webmin/ 2119 (eval) /usr/local/webmin/ 736 miniserv::handle_request


Is it possible to change Virtualmin configuration to bypass this limitation?

Regards, Filip.<br><br>Post edited by: expro, at: 2009/03/05 03:54

Thu, 03/05/2009 - 09:48
Joe's picture

<div class='quote'>Is it possible to change Virtualmin configuration to bypass this limitation?</div>

Yes, this is actually determined by the Webmin Users and Groups module, in the Module Configuration in the &quot;New user options&quot; section. It is labeled &quot;Maximum user and group name length&quot;.


Check out the forum guidelines!

Thu, 03/05/2009 - 12:06 (Reply to #2)

Yup, it works. Thanks! ;-)

Tue, 06/02/2009 - 04:36

Just want to add confirmation from another FreeBSD user that this indeed seems to be working well. After rebuilding world and kernel with username extended to allow 64 chars, and Webmin set as Joe indicated, all seems well. Time will tell if there's any port out there which needs manual updating, but so far everything seems to be working.

Topic locked