From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jerome M Berkman Newsgroups: gmane.os.tru64.managers Subject: SUMMARY: max username length Date: Thu, 20 Feb 2003 09:22:06 -0800 (PST) Sender: tru64-unix-managers-owner@ornl.gov Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1045762153 12076 80.91.224.249 (20 Feb 2003 17:29:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 20 Feb 2003 17:29:13 +0000 (UTC) Return-path: Original-Received: from sws1.ctd.ornl.gov ([160.91.22.101]) by main.gmane.org with smtp (Exim 3.35 #1 (Debian)) id 18luUW-00033H-00 for ; Thu, 20 Feb 2003 18:28:12 +0100 Original-Received: (qmail 8587 invoked by uid 5); 20 Feb 2003 17:28:06 -0000 Original-Followup-To: poster Precedence: bulk Original-Received: (qmail 8578 invoked by uid 49493); 20 Feb 2003 17:28:06 -0000 Original-Received: from jerry@uclink.berkeley.edu by sws1 by uid 49491 with qmail-scanner-1.14 (clamscan: 0.54. spamassassin: 2.50-cvs. Clear:SA:0(-11.4/5.0):. Processed in 0.477272 secs); 20 Feb 2003 17:28:06 -0000 Original-Received: from unknown (HELO emroute3.ornl.gov) (160.91.4.110) by 0 with SMTP; 20 Feb 2003 17:28:05 -0000 Original-Received: from emroute3.ornl.gov (localhost [127.0.0.1]) by emroute3.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HAM00HPVB6741@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 20 Feb 2003 12:28:03 -0500 (EST) Original-Received: from uclink4.berkeley.edu (uclink4.Berkeley.EDU [128.32.25.39]) by emroute3.ornl.gov (PMDF V6.2 #30669) with ESMTP id <0HAM00KAQAWUID@emroute3.ornl.gov> for tru64-unix-managers@sws1.ctd.ornl.gov (ORCPT tru64-unix-managers@ornl.gov) ; Thu, 20 Feb 2003 12:22:07 -0500 (EST) Original-Received: from uclink4.berkeley.edu (uclink4.berkeley.edu [128.32.25.39]) by uclink4.berkeley.edu (8.12.7/8.12.3) with SMTP id h1KHM6AY359089 for ; Thu, 20 Feb 2003 09:22:06 -0800 (PST) In-reply-to: X-Sender: jerry@uclink4.berkeley.edu Original-To: tru64-unix-managers@ornl.gov Xref: main.gmane.org gmane.os.tru64.managers:3396 X-Report-Spam: http://spam.gmane.org/gmane.os.tru64.managers:3396 I asked: I'd like to create accounts with usernames longer than 8 chars. Is this possible? If so, how do I do it? The answers from Tim Cutts and Spider Boardman, see below, said it is possible but not necessarily desirable. sysconfig shows the current max is 12 characters (11 useful plus a trailing null): # /sbin/sysconfig -q generic login_name_max generic: login_name_max = 12 This is changable up to 64 at boot time: # /sbin/sysconfig -Q generic login_name_max generic: login_name_max - type=INT op=CQ min_val=9 max_val=64 But useradd and usermod have a max of 8 characters; even though login_name_max is 12, "useradd long_name" fails. Since we use those heavily in our scripts, we are stuck at 8 character login names with a maximum of 8 characters. - Jerry ======================================================================= Answers: >From tjrc@sanger.ac.uk Thu Feb 20 09:04:16 2003 Date: Mon, 3 Feb 2003 09:22:54 +0000 From: Tim Cutts To: Jerome M Berkman Subject: Re: max username length On Sun, Feb 02, 2003 at 09:20:33AM -0800, Jerome M Berkman wrote: > > I'd like to create accounts with usernames longer than 8 chars. > Is this possible? If so, how do I do it? It's possible, but not advisable. You will have problems when you need to interoperate with other operating systems (not all of which support such long user names - AIX doesn't like them) and you may find that a lot of third party programs either don't work at all, or cause you other difficulties such as parsing output, because they allow a certain amount of space for the username. For example, normally I could tot up the size of some files in a directory like this: ls -l *.myi | awk '{s += $5} END {print s}' which works fine until one of the user names is too long, and column 3 (username) becomes continuous with column 4 (group), when suddenly I need to be adding the contents of column 4 rather than column 5. If some users have long names and others don't, suddenly I can't do this simple operation any more, without writing my own program to do it. If the only reason you want long user names is so that users have a login name that they like, I'd resist it, if I were you. I've worked in several places where different schemes have been used, and the one that seems to work best, in my experience, is initials plus an optional digit if the initials aren't unique. Hence, I am tjrc here, and was tjrc1 when I was at the University of Cambridge. The usernames are short, easy to remember, and personal. If your users then want a memorable e-mail address, you could always create aliases for them. I have one here; although my login name is tjrc, I have an e-mail alias of tim.cutts. Tim -- Dr Tim Cutts Informatics Systems Group Wellcome Trust Sanger Institute, Hinxton, Cambridge, CB10 1SA, UK ======================================================================= >From Spider.Boardman@Orb.Nashua.NH.US Thu Feb 20 09:04:16 2003 Date: Mon, 03 Feb 2003 13:18:16 -0500 From: Spider.Boardman@Orb.Nashua.NH.US To: Jerome M Berkman Subject: Re: max username length It certainly can be done. See the attached (wherein I've answered this one before). [ Part 2: "Included Message" ] Date: Fri, 24 Jan 2003 06:24:12 -0500 From: Spider.Boardman@Orb.Nashua.NH.US To: Padiyath Kumar Subject: Re: username length See 'sysconfig -q generic login_name_max', and 'man 5 sys_attrs_generic'. However, be aware that the value of that sysconfig parameter INCLUDES the trailing NUL byte. Thus, the default value of 12 supports 11-byte username strings. Hope this helps, --s. -- Spider Boardman (at home) spider.boardman@Orb.Nashua.NH.US The management (my cats) made me say this. http://users.rcn.com/spiderb/ PGP public key fingerprint: 96 72 D2 C6 E0 92 32 89 F6 B2 C2 A0 1C AB 1F DC