shadow-useradd package to add more users to the system -- for Samba usage. It does not accept user names with a dot (or period) character.
root@OpenWrt:~# useradd --create-home --shell "/bin/ash" "firstname.lastname";
useradd: invalid user name 'firstname.lastname'
I decided to manually edit the user and group name in
/etc/group, and it works fine, which means Linux does allow that character.
What is the problem with that character? And is it a common issue of
useradd command across all Linux distros or just OpenWrt?
Here is a snip from the Debian useradd manpage:
It is usually recommended to only use usernames that begin with a lower case letter or an underscore, followed by lower case letters, digits, underscores, or dashes. They can end
with a dollar sign. In regular expression terms: [a-z_][a-z0-9_-]*[$]?#
On Debian, the only constraints are that usernames must neither start with a dash ('-') nor plus ('+') nor tilde ('~') nor contain a colon (':'), a comma (','), or a whitespace
(space: ' ', end of line: '\n', tabulation: '\t', etc.). Note that using a slash ('/') may break the default algorithm for the definition of the user's home directory.
If I understand this right, dots in usernames aren't recommended, but possible.