[Pkg-shadow-devel] [shadow-maint/shadow] Allow dots (`.`) in user/group names (#34)

Nicolas François nicolas.francois at centraliens.net
Tue Sep 13 00:12:43 UTC 2016


Hi,

is_valid_name() is one of the functions that varies depending on the
distributions.

One historical reason for forbidding periods in user/group names is that it
was used by BSD's chown to separate username and groupname.
I could find this reference:
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/chown.html

Also any program could have its own regex and reject / accept usernames (I
don't know any standard username regex definition). Although, since much
more relaxed policy have been used for a while (for example on Debian:
https://github.com/Distrotech/shadow-utils/blob/distrotech-shadow-utils/debian/patches/506_relaxed_usernames)
allowing periods should be quite safe.

Best Regards,
-- 
Nekral

2016-09-12 13:48 GMT-07:00 Serge E. Hallyn <serge at hallyn.com>:

> Quoting Alec Larsen (notifications at github.com):
> > Is there a technical reason why dots (`.`) are not allowed in user/group
> names?
> >
> > And if not, would a PR to allow them be accepted? It seems like a simple
> enough change to [`is_valid_name` in libmisc/chkname.c](https://
> github.com/shadow-maint/shadow/blob/e6b23e1431d8d798bb3c620bc26557
> ea44a30b98/libmisc/chkname.c#L49).
>
> Hi,
>
> this is the kind of thing which seems to me like it should be perfectly
> safe, but for which i suspect there is a strong historical (or even
> current) reason why it's refused.  I'm cc:ing the mailing list so
> hopefully someone less ignorant than I can answer.
>
> thanks,
> -serge
>
> _______________________________________________
> Pkg-shadow-devel mailing list
> Pkg-shadow-devel at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-shadow-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/attachments/20160912/82856925/attachment.html>


More information about the Pkg-shadow-devel mailing list