I tried to use both useradd and adduser to get a username typed as Firstname.Lastname. I tried also installing libuser and using luseradd, but also I got error. Is there a way to do that (of course it should be)? I'm trying to write a script that takes a list of users from a file and creates the new users there are in. I can do that with the simple username, but I need to list Firstname.Lastname. if I use: adduser --force-badname then I can get the user Firstname.Lastname but the home folder does not contain Desktop and Templates dirs.. as well if I use: useradd --create-home "john.doe" I can get the home folder but no Desktop and Templates inside....
The easiest way is to use to
adduser firstname.lastname --force-badname
You'll get a message
Allowing use of questionable username. and then it will continue with creating the home directory and asking for the password.