Return to BSD News archive
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!noc.netcom.net!news.sprintlink.net!ns1.win.net!ns1.win.net!not-for-mail From: bugs@news.win.net (Mark Hittinger) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: [Q] username length limit: getting around it Date: 16 May 1995 23:40:24 -0400 Organization: Win.Net Communications, Inc. Lines: 33 Message-ID: <3pbr78$af@ns1.win.net> References: <3p0av2$edf@decaxp.harvard.edu> NNTP-Posting-Host: ns1.win.net X-Newsreader: NN version 6.5.0 #4 (NOV) itsymbal@scws36.harvard.edu (Sir Ilya) writes: >There seems to be a limit on how long a username can be. >For example, I can adduser webadmin and it works just fine, but not with >a name like webmaster. Is there a way to get around this? In /usr/include/utmp.h set UT_NAMESIZE to 10. In the kernel there is a companion parameter called MAX_LOGNAME (or something) in param.h. The kernel's user name length limit is 11 chars + null byte. The default utmp.h size is 8. I reset UT_NAMESIZE to 10 on my boxes and recompiled the various utilities. One module you might forget to recomple is xterm. :-) Shutdown/reboot in single user mode and remove the utmp file. Then allow the system to come up and you are there. This seems to work great except for a user such as "1iamalong1". The sendmail doesn't seem to like usernames with a digit as the first character. I have tried to get the core team to adopt UT_NAMESIZE=10 so that I wouldn't have to keep adjusting it - but so far they like char8 :-). When I tried to set the kernel for max_logname up to 16 ect bizarre things happened so I backed off to 10. Regards, Mark Hittinger bugs@win.net -- "This is going to cause more confusion than a mouse in a burlesque show." - Foghorn Leghorn.