• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Username length 16

amilojko

Member

Thanks: 1
Messages: 29

#1
I know this has been discussed to the n(th) degree but I am wondering if FreeBSD project has plans to increase the number of characters in a username to 60+ in future releases. Or am I going to start using other OS? After using FreeBSD for over a decade I hate to have DOS 8.3 character limits sort of thing. I don't want to rebuild the world either.

Any light on this?

Thanks!
 

fonz

Son of Beastie

Thanks: 368
Messages: 2,560

#2
amilojko said:
plans to increase the number of characters in a username to 60+
Why in the name of [insert favourite deity/celebrity/scientist here] would you want that? :q You do know that there's a Gecos field, right?

amilojko said:
Or am I going to start using other OS.
That is of course your choice. Somehow I feel strangely unaffected. :e

amilojko said:
After using FreeBSD for over a decade
[snip]
I don't want to rebuild the world either.
If you've been using FreeBSD that long you ought to know that wanting something that nobody else wants but not wanting to do anything for it doesn't usually produce much result.

Besides, there might be more to it than just FreeBSD itself. Userland applications often have parameters like these hardcoded and when they do, the size is highly unlikely to be as long as that. In other words: there probably won't be many applications that can (correctly) handle such outrageously long usernames.

Fonz
 

amilojko

Member

Thanks: 1
Messages: 29

#3
Hi there,

Thanks for your reply. I am hardly the only one wanting this feature. 60 + characters is just looking into the future. Something around 30/40 would be competitive right now. It would make FreeBSD much better option for web hosting servers. It would be nice to use FreeBSD for everything. Plus other popular systems don't have that limit. Imagine being able to log into your server with your email address. Well, I'll just have to put my tail between my legs and use CentOS.
 

fluca1978

Aspiring Daemon

Thanks: 70
Messages: 735

#4
amilojko said:
Imagine being able to log into your server with your email address.
I don't think I will never login into one of my server typing so much characters....
Besides this, a lot of application nowdays use a database backend for accounting, so there is no particular need I can see in having so much long usernames.
 

funky

Member

Thanks: 12
Messages: 41

#5
See adduser(8), so it is possible, but
amilojko said:
I don't want to rebuild the world either.
So, maybe the given alternative helps, from the man page
Code:
"... you can define an alias in /etc/mail/aliases."
Maybe this meets your requirements.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,125
Messages: 27,000

#7
I'm not sure what the maximum username length is but have you considered using LDAP?
 

funky

Member

Thanks: 12
Messages: 41

#8
kpa said:
Those are email aliases for the MTA in the system, not for login.
Oh, I was just blindly citing (and probably misinterpreting) the man page, sorry.

A quick "greping" through the source of FreeBSD 9.0 revealed:
Code:
int UT_NAMESIZE = sizeof(utmp.ut_user)
Code:
char ut_user[32];
however the ut_user is in the utmpx struct defined in utmpx.h and not in utmp.h (which actually can not be found in the source), so I am not sure.
 

gkontos

Daemon

Thanks: 455
Messages: 2,094

#9
What he is asking might sound strange and funny to most of us. However, when it comes to control panels sometimes it is a must.
 

fluca1978

Aspiring Daemon

Thanks: 70
Messages: 735

#10
gkontos said:
What he is asking might sound strange and funny to most of us. However, when it comes to control panels sometimes it is a must.
Are you referring to some FreeBSD specific control panel or to an application based one? because the latter can use any authentication system is required, even an ad-hoc one.
 

gkontos

Daemon

Thanks: 455
Messages: 2,094

#11
fluca1978 said:
Are you referring to some FreeBSD specific control panel or to an application based one? because the latter can use any authentication system is required, even an ad-hoc one.
No, I am referring to control panels like CPANEL, WHM, VIRTUALMIN, etc. The majority of control panels that I have seen require long usernames for setting up virtual email accounts.

I don't like this technique for setting up email accounts. I prefer to keep all my users to a database, separated from OS accounts. That's the way I have done it but in order to make it work I had to improvise a lot !

Regards
 

amilojko

Member

Thanks: 1
Messages: 29

#12
gkontos said:
What he is asking might sound strange and funny to most of us. However, when it comes to control panels sometimes it is a must.
Bingo! This is the meat and potatoes. Nobody today uses Unix to login via serial terminal Wyse60 or something and do email. Or is there?!
Time is money and sometimes you have to deploy quickly. CentOS can be ready to rock in 2 hours flat. No experience necessary. FreeBSD in 24-48. Trust me, inexperienced user will always win. There are a lot more of them.

Even adduser says it's 16 characters for historical reasons. Well, lets get on with it and move to the 21 century. CentOS guys and their "upstream" are galloping forward. I hate to rub this in, sorry.
 

funky

Member

Thanks: 12
Messages: 41

#13
amilojko said:
[snip]
Trust me, ...
[snip]
No, I don't.

Additional hints about the actual problem: There is also a #define MAXLOGNAME 17 in sys/sys/param.h which defines the maximum login name length. I think this has to be altered in conjunction with the UT_NAMESIZE variable.
 

gkontos

Daemon

Thanks: 455
Messages: 2,094

#14
amilojko said:
CentOS can be ready to rock in 2 hours flat. No experience necessary.
FreeBSD in 24-48.
Trust me, inexperienced user will always win. There are a lot more of them.
No experience necessary, just a few clicks and you are done. Who cares if bluetooth and a bunch of useless, sometimes dangerous, services are activated on a server by default ?

Inexperienced users don't win. They just cost less to hire them. Sometimes they end up costing a fortune when their inexperience has caused a small disaster.

amilojko said:
CentOS guys and their "upstream" are galloping forward.
I hate to rub this in, sorry.
Their "upstream" is galloping but I wouldn't be so sure for the CentOS folks.
 

fluca1978

Aspiring Daemon

Thanks: 70
Messages: 735

#16
Is there any concrete software/service that requires usernames longer than those FreeBSD provides? I guess this could be the only requirement to convince developers to increase the length, but we need a software listing here. This is my thought.
 

Sebulon

Aspiring Daemon

Thanks: 128
Messages: 709

#17
I set up our FBSD FreeBSD servers to authenticate towards our Active Directory using the winbind module and when some of our technicians was using their purpose-made ad-storage-accounts (19 chars) to log in via ssh, they where just met by a cryptic error message. After spending some time at teh goog, this was obviously the problem we faced. The solution we applied was to shorten the login names for those accounts, but if FBSD FreeBSD were to bump the max chars up to, let´s say, 32, we would never have had that problem in the first place.

Bottom line, if there aren´t any real downsides to it, then why not?

/Sebulon
 

amilojko

Member

Thanks: 1
Messages: 29

#18
fluca1978 said:
Is there any concrete software/service that requires usernames longer than those FreeBSD provides? I guess this could be the only requirement to convince developers to increase the length, but we need a software listing here. This is my thought.
@fluca1978

Yes, Webmin/Virtualmin. But really any service needs it if you want to support virtual accounts with names that mean" something. I patched my system to support 64 characters and haven't run into trouble yet. I don't like "patchwork" though. Isn't it convincing enough that other systems have much longer limits? Isn't it convincing that the reason it is still 16 is "historical".

I agree with Sebulon too. You got a stay competitive. There are two facts that I will mention. I installed CentOS on a server in 2 hours flat ready to do whatever you want. I installed Ubuntu on a laptop to dual boot with Windows using wubi in 1 hour flat. All hardware works. Didn't move a finger.
:r
 

amilojko

Member

Thanks: 1
Messages: 29

#19
Our DutchDaemon friend here has time to check spelling. How about trying to convince our friends at FreeBSD to do something about this username limit? What do you say? I'll have a case of Heineken delivered to your door!
 

wblock@

Administrator
Staff member
Administrator
Moderator
Developer

Thanks: 3,607
Messages: 13,850

#20
amilojko said:
Our DutchDaemon friend here has time to check spelling.
How about trying to convince our friends at FreeBSD to do something about this username limit?
As someone who needs and uses it, you can make a better case for it than he can. Try freebsd-questions.
 

fluca1978

Aspiring Daemon

Thanks: 70
Messages: 735

#21
This is just my thought... I usually do not use username so that long in my servers, however I've got usernames long more than 16 chars, but logins are handled via ldap or at the application level. I have to confess I've not tried ldap + FreeBSD for this particular case. If this is true also for FreeBSD, it means that, as already said, long usernames are almost handled by an application layer over the operating system.
 

vertexSymphony

Member

Thanks: 13
Messages: 79

#22
amilojko said:
Our DutchDaemon friend here has time to check spelling.
How about trying to convince our friends at FreeBSD to do something about this username limit?
What do you say?
I'll have a case of Heineken delivered to your door!
Well, DutchDaemon is a moderator ... so that's what he does.
Everyone has his own "department" and you just can't come un-politely asking and telling someone to do whatever YOU NEED (I don't even know if DutchDaemon is a coder and can even make it anyways), specially if you bash an entire OS for such a stupid detail
Honestly, unless you make a good case and submit a proper PR, this is a non-issue ..

As usual:
1) Stop complaining
2) Patches welcome.

Thank you.
 

amilojko

Member

Thanks: 1
Messages: 29

#23
vertexSymphony said:
Well, DutchDaemon is a moderator ... so that's what he does.
Everyone has his own "department" and you just can't come un-politely asking and telling someone to do whatever YOU NEED (I don't even know if DutchDaemon is a coder and can even make it anyways), specially if you bash an entire OS for such a stupid detail
Honestly, unless you make a good case and submit a proper PR, this is a non-issue ..

As usual:
1) Stop complaining
2) Patches welcome.

Thank you.
I wouldn't say it's a "stupid" detail, I'd say it's a "trivial" detail, but it takes an hour to recompile the source to support longer usernames.
And exactly because it's trivial, it should be done right from the start.

This is done on a fresh system with installed sources:

a) Change /usr/src/sys/sys/param.h MAXLOGNMAME to 65
Code:
#define MAXLOGNAME      65
b) Change /usr/src/include/utmp.h UT_NAMESIZE to 64
Code:
#define UT_NAMESIZE     64
c) Then rebuild world and kernel:
Code:
cd /usr/src
make -j4 buildworld
make -j4 buildkernel
make installkernel
reboot (don’t have to go into single user mode if done on a fresh system without any services running)
adjkerntz -i
mergemaster -p
cd /usr/src
make installworld
mergemaster
reboot
It's in the bible.
Romans, Chapter 25.7 "Rebuild World"
Sounds biblical.
 

amilojko

Member

Thanks: 1
Messages: 29

#24
fluca1978 said:
This is just my thought... I usually do not use username so that long in my servers, however I've got usernames long more than 16 chars, but logins are handled via ldap or at the application level. I have to confess I've not tried ldap + FreeBSD for this particular case. If this is true also for FreeBSD, it means that, as already said, long usernames are almost handled by an application layer over the operating system.
True fluca1978, one can use LDAP for some things, but if you want a complete system to be uniform and use one user database then you need to have every service support ldap and I'm not sure they all do. This adds another layer of complexity and the fix is fairly simple.
In some instances LDAP is the solution.
 

Crivens

Moderator
Staff member
Moderator

Thanks: 537
Messages: 1,465

#25
amilojko said:
I wouldn't say it's a "stupid" detail, I'd say it's a "trivial" detail,
but it takes an hour to recompile the source to support longer usernames.
And exactly because it's trivial, it should be done right from the start.
This is only the start. Now you have to prove that you did not open any buffer-overflow holes in the base system where some lazy bum (also known as programmer) has used his own idea of how to get the max user name length. And so you may create a new root hole by buffer overflow.

I do not say that it is so and your changes will do it - but have you at least tried to find out? These changes are simply done and rebuilding everything with it is also done fast. But that is only the start.

amilojko said:
...
It's in the bible.
Romans, Chapter 25.7 "Rebuild World"
Sounds biblical.
Yes, and we can do it with some simple finger movements! :e
But you can also break world as easily, as some of us had the "pleasure" to find out some place along that road. :stud

So if you now have a system up and running with these new limits, please check if something weird happens when running it. If not, why not submit it and feel proud of having done it?
I know I would.
 
Top