adduser Firstname.Lastname

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite
1












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....










share|improve this question























  • OK SOLVED. (that was silly...) --> Desktop, Templates and other dirs are configured at first login.
    – pietro letti
    2 hours ago










  • That's what you were told in the answer from @NasirRiley. Please consider accepting it since it seems to have solved your problem. (Similarly with your other questions: please accept the answer that worked for you.)
    – roaima
    1 hour ago














up vote
1
down vote

favorite
1












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....










share|improve this question























  • OK SOLVED. (that was silly...) --> Desktop, Templates and other dirs are configured at first login.
    – pietro letti
    2 hours ago










  • That's what you were told in the answer from @NasirRiley. Please consider accepting it since it seems to have solved your problem. (Similarly with your other questions: please accept the answer that worked for you.)
    – roaima
    1 hour ago












up vote
1
down vote

favorite
1









up vote
1
down vote

favorite
1






1





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....










share|improve this question















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....







linux bash shell-script ubuntu useradd






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 3 hours ago

























asked 4 hours ago









pietro letti

6916




6916











  • OK SOLVED. (that was silly...) --> Desktop, Templates and other dirs are configured at first login.
    – pietro letti
    2 hours ago










  • That's what you were told in the answer from @NasirRiley. Please consider accepting it since it seems to have solved your problem. (Similarly with your other questions: please accept the answer that worked for you.)
    – roaima
    1 hour ago
















  • OK SOLVED. (that was silly...) --> Desktop, Templates and other dirs are configured at first login.
    – pietro letti
    2 hours ago










  • That's what you were told in the answer from @NasirRiley. Please consider accepting it since it seems to have solved your problem. (Similarly with your other questions: please accept the answer that worked for you.)
    – roaima
    1 hour ago















OK SOLVED. (that was silly...) --> Desktop, Templates and other dirs are configured at first login.
– pietro letti
2 hours ago




OK SOLVED. (that was silly...) --> Desktop, Templates and other dirs are configured at first login.
– pietro letti
2 hours ago












That's what you were told in the answer from @NasirRiley. Please consider accepting it since it seems to have solved your problem. (Similarly with your other questions: please accept the answer that worked for you.)
– roaima
1 hour ago




That's what you were told in the answer from @NasirRiley. Please consider accepting it since it seems to have solved your problem. (Similarly with your other questions: please accept the answer that worked for you.)
– roaima
1 hour ago










1 Answer
1






active

oldest

votes

















up vote
3
down vote













The easiest way is to use to --force-badname switch.



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.






share|improve this answer




















  • when I do that I get the new.user home dir without Desktop and Templates folder... how can I add those folders?
    – pietro letti
    3 hours ago










  • @pietroletti They will either be created at first login or if you want them to be created when the user is added: The files and directories that are created in the user's home when the user is added are located in /etc/skel. Create what you desire to be added in that directory via mkdir /etc/skel/Desktop for example. They will then be created when the user is added. Do this before running the script that adds the users.
    – Nasir Riley
    2 hours ago











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f470809%2fadduser-firstname-lastname%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
3
down vote













The easiest way is to use to --force-badname switch.



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.






share|improve this answer




















  • when I do that I get the new.user home dir without Desktop and Templates folder... how can I add those folders?
    – pietro letti
    3 hours ago










  • @pietroletti They will either be created at first login or if you want them to be created when the user is added: The files and directories that are created in the user's home when the user is added are located in /etc/skel. Create what you desire to be added in that directory via mkdir /etc/skel/Desktop for example. They will then be created when the user is added. Do this before running the script that adds the users.
    – Nasir Riley
    2 hours ago















up vote
3
down vote













The easiest way is to use to --force-badname switch.



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.






share|improve this answer




















  • when I do that I get the new.user home dir without Desktop and Templates folder... how can I add those folders?
    – pietro letti
    3 hours ago










  • @pietroletti They will either be created at first login or if you want them to be created when the user is added: The files and directories that are created in the user's home when the user is added are located in /etc/skel. Create what you desire to be added in that directory via mkdir /etc/skel/Desktop for example. They will then be created when the user is added. Do this before running the script that adds the users.
    – Nasir Riley
    2 hours ago













up vote
3
down vote










up vote
3
down vote









The easiest way is to use to --force-badname switch.



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.






share|improve this answer












The easiest way is to use to --force-badname switch.



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.







share|improve this answer












share|improve this answer



share|improve this answer










answered 3 hours ago









Nasir Riley

1,659139




1,659139











  • when I do that I get the new.user home dir without Desktop and Templates folder... how can I add those folders?
    – pietro letti
    3 hours ago










  • @pietroletti They will either be created at first login or if you want them to be created when the user is added: The files and directories that are created in the user's home when the user is added are located in /etc/skel. Create what you desire to be added in that directory via mkdir /etc/skel/Desktop for example. They will then be created when the user is added. Do this before running the script that adds the users.
    – Nasir Riley
    2 hours ago

















  • when I do that I get the new.user home dir without Desktop and Templates folder... how can I add those folders?
    – pietro letti
    3 hours ago










  • @pietroletti They will either be created at first login or if you want them to be created when the user is added: The files and directories that are created in the user's home when the user is added are located in /etc/skel. Create what you desire to be added in that directory via mkdir /etc/skel/Desktop for example. They will then be created when the user is added. Do this before running the script that adds the users.
    – Nasir Riley
    2 hours ago
















when I do that I get the new.user home dir without Desktop and Templates folder... how can I add those folders?
– pietro letti
3 hours ago




when I do that I get the new.user home dir without Desktop and Templates folder... how can I add those folders?
– pietro letti
3 hours ago












@pietroletti They will either be created at first login or if you want them to be created when the user is added: The files and directories that are created in the user's home when the user is added are located in /etc/skel. Create what you desire to be added in that directory via mkdir /etc/skel/Desktop for example. They will then be created when the user is added. Do this before running the script that adds the users.
– Nasir Riley
2 hours ago





@pietroletti They will either be created at first login or if you want them to be created when the user is added: The files and directories that are created in the user's home when the user is added are located in /etc/skel. Create what you desire to be added in that directory via mkdir /etc/skel/Desktop for example. They will then be created when the user is added. Do this before running the script that adds the users.
– Nasir Riley
2 hours ago


















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f470809%2fadduser-firstname-lastname%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What does second last employer means? [closed]

List of Gilmore Girls characters

Confectionery