Name length limit?

Are you aware of any additional limitations that might be imposed on a user's name length?

I am running under FreeBSD 7.2, and I was successfully able to rebuild the kernel with support for 64 character login names. I can create long user names without a problem, and in fact Virtualmin seems to have no problem with them either (yes, I did adjust the max user/group name length setting in Webmin.)

All seemed good, until I setup an email account that resulted in a 34 character username. At first suspected an IMAP problem, but upon digging deeper, it definitely seems to be an authentication issue with the OS. It looks like up to a 32 character username will work, but 33 or more will fail. The OS is definitely patched correctly, so I suspect the problem is somewhere within the authentication scheme.

This may be yet another stumbling block with FreeBSD that will just need to be overcome. Luckily, I have very few domains long enough to cause such an issue, and can work around it by having these clients use initials for the name portion of their usernames.

Any info you might have that could be helpful would be appreciated. I suspecting that another bit of code might need to be patched to get this working, but right now I'm not so sure where to start looking.

Thanks

Status: 
Closed (fixed)

Comments

FWIW, if I'm looking at it correctly, the source code for login appears to use the proper constants, so it looks like the problem may be with pam...

There's no 32-character limit in Virtualmin, but the libc and/or dovecot may have them on FreeBSD. I can't really comment further though, as that isn't our code..

I don't think it's in libc or dovecot. It definitely appears to be a PAM related issue. To me it looks like the UT_NAMESIZE constant should have been used instead of a fixed 32 char string in the source code, but I don't know what else changing it might break if it is changed. Not knowing enough about it, I think I'll have to live with it for now, but will try to discuss it on some FreeBSD forums.