Username length restriction in FreeBSD.

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

Username length restriction in FreeBSD.

Hi guys,

I'm aware of limitation described here - http://www.virtualmin.com/documentation/id,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:

[code:1]

adduser

Username: this.is.very.long.username Full name: Uid (Leave empty for default): Login group [this.is.very.long.username]: Login group is this.is.very.long.username. Invite this.is.very.long.username into other groups? []: Login class [default]: Shell (sh csh tcsh bash rbash false scponly nologin nologin) [sh]: Home directory [/home/this.is.very.long.username]: 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 : this.is.very.long.username Password : <blank> Full Name : Uid : 10000 Class : Groups : this.is.very.long.username Home : /home/this.is.very.long.username Home Mode : Shell : /bin/sh Locked : no OK? (yes/no): yes adduser: INFO: Successfully added (this.is.very.long.username) to the user database. Add another user? (yes/no): no Goodbye! #

[/code:1]

Normal work in the system is even possible;-)

[code:1] $ ssh -Cl this.is.very.long.username 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(this.is.very.long.username) gid=10000(this.is.very.long.username) groups=10000(this.is.very.long.username) $

[/code:1]

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 this.is.very.long.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/miniserv.pl 2119 (eval) /usr/local/webmin/miniserv.pl 736 miniserv::handle_request

[/code:1]

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
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)
expro

Yup, it works. Thanks! ;-)

Tue, 06/02/2009 - 04:36
novoops

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