On Dienstag 23 Januar 2007, you wrote: > Package: adduser > Version: 3.63 > Severity: normal > > I can not explain how the following can happen: > > [EMAIL PROTECTED]:/var/lib/cvs# addgroup 'a:a' > addgroup: To avoid problems, the username should consist of > letters, digits, underscores, periods and dashes. For compatibility with > Samba machine accounts $ is also supported at the end of the username > [EMAIL PROTECTED]:/var/lib/cvs# addgroup 'a_a' > addgroup: Please enter a username matching the regular expression > configured > via the name_regex configuration variable. Use the `--force-badname' > option to relax this check or reconfigure name_regex. > [EMAIL PROTECTED]:/var/lib/cvs# > > The first message tells me that the second call of addgroup should work, > but it does not. The more strange is that it the error message the > second time is different. And it also mention name_regex that is nowhere > to be found (I did not digged at the source code to find out...). Also, > I could not find any documentation on valid group names. Only at > adduser.conf(5) I found USER_REGEX that configures user names (not group > names).
This is rather simple: addgroup 'a:a' is rejected by a hardcoded regex in adduser; this regular expression enforces the conformity to IEEE Std 1003.1-2001; this regular expression rejects the ":". addgroup 'a_a' is accepted the above mentioned regular expression but rejected by the expression "name_regex" (because of the "_" character) which can be customized in /etc/adduser.conf (NAME_REGEX, see man 5 adduser.conf). I documented in adduser.conf (5) that NAME_REGEX also applies to group names and added the commented out default value to adduser.conf. Also added a paragraph to the manpage describing what a valid name is. Jörg -- What did you do to the cat? It looks half-dead. -Schroedinger's wife
signature.asc
Description: This is a digitally signed message part.

