Hi guys,
I’m aware of limitation described here - http://www.virtualmin.com/documentation/id,freebsd_installation_and_configuration/#username_length. 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 © 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