It would be great if useradd and groupadd would support names longer than 16 chars. POSIX does not specify a particular limit (instead it's a sysconf() parameter), so there are no compatibility issues in using long names. groupadd and useradd themselves behave the same to programs that call them with short names, so there are no issues as well. On the other hand, my service framework uses names like <servicename>-<username>, so it's really useful. And to make the decision even easier: the Debian tools work fine with long names.
Ok, please check for me what package contains the tools on debian, and even better, a url to the .deb and patches.
> Ok, please check for me what package contains the tools on debian, passwd > and even better, a url to the .deb http://ftp.debian.org/debian/pool/main/s/shadow/passwd_20000902-12_i386.deb > and patches. http://ftp.debian.org/debian/pool/main/s/shadow/shadow_20000902-12.diff.gz http://ftp.debian.org/debian/pool/main/s/shadow/shadow_20000902.orig.tar.gz Do you need anything else?
Created attachment 2785 [details, diff] Patch for long group names I've attached the patch to remove the arbitrary group name limit from group{add,mod,del}. Since there is no standardized limit on the length of group names, it should be up to the administrator to choose the maximum length. At most groupadd should print a warning, but it must not abort.
Do you actually use group names longer than 16 chars ? As for the username limit, this is glibc/utmp dependant. It is limited as follow: ------------------------cut--------------------------- /* * User names are limited by whatever utmp can * handle (usually max 8 characters). */ if (strlen(name) > sizeof(ut.ut_user)) return 0; ------------------------cut--------------------------- The sizeof ut.ut_user is equal to __UT_NAMESIZE, which in my /usr/include/bits/utmp[x].h, it is as follows: ------------------------cut--------------------------- #define __UT_LINESIZE 32 #define __UT_NAMESIZE 32 #define __UT_HOSTSIZE 256 ------------------------cut--------------------------- Meaning, usernames of 32 chars is supported.
Yes, I do use long group names for my service framework. The {user,group}names are called <service_name>-<user/group_name>. So, to give an example, if the service is called qmail-smtp-ssl and the group is qmail, the resulting name is qmail-smtp-ssl-qmail. That's 20 chars. As for the user names, that's a limitation of glibc. If I need longer user names, I can just change the defines and recompile glibc and shadow (I might actually have to recompile some more packages and remove the current utmp file).
ok, ive added long groupname support to shadow-4.0.6 (no version bump)