adduser Firstname.Lastname
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
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
add a comment |Â
up vote
1
down vote
favorite
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
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
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
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
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
linux bash shell-script ubuntu useradd
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
add a comment |Â
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
add a comment |Â
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.
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 viamkdir /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
add a comment |Â
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.
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 viamkdir /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
add a comment |Â
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.
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 viamkdir /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
add a comment |Â
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.
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.
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 viamkdir /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
add a comment |Â
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 viamkdir /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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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