How to configure which characters are allowed in CentOS usernames

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











up vote
0
down vote

favorite












In systems such as Debian, there is a file /etc/adduser.conf which includes directive NAME_REGEX that can be used to define which characters are allowed in a username.



Is there a way to do this in CentOS 6.9? I can see that there is a file /etc/default/useradd but there is no indication anywhere in the documentation that it could support a similar directive.



I would like to be able to create a username with the @ sign in it, such as user@domain.com.







share|improve this question

















  • 1




    what are your trying to achieve here ?
    – Kiwy
    Jun 14 at 12:00






  • 1




    I would like to be able to create a username with the '@' sign in it, such as user@domain.com
    – Petr Břeň
    Jun 14 at 12:09






  • 3




    dont do that. it will break so many thing for example you won't be able to connect via ssh on the machine because ssh user@domain@hostname will never work.
    – Kiwy
    Jun 14 at 12:11






  • 1




    I've edited your question to make it clearer. Relevant details should really be added to the question so that it can be answered without having to read the comments.
    – Anthony Geoghegan
    Jun 14 at 13:17










  • serverfault.com/q/879393/131555 interesting question with some background ;-)
    – Kiwy
    Jun 14 at 13:30














up vote
0
down vote

favorite












In systems such as Debian, there is a file /etc/adduser.conf which includes directive NAME_REGEX that can be used to define which characters are allowed in a username.



Is there a way to do this in CentOS 6.9? I can see that there is a file /etc/default/useradd but there is no indication anywhere in the documentation that it could support a similar directive.



I would like to be able to create a username with the @ sign in it, such as user@domain.com.







share|improve this question

















  • 1




    what are your trying to achieve here ?
    – Kiwy
    Jun 14 at 12:00






  • 1




    I would like to be able to create a username with the '@' sign in it, such as user@domain.com
    – Petr Břeň
    Jun 14 at 12:09






  • 3




    dont do that. it will break so many thing for example you won't be able to connect via ssh on the machine because ssh user@domain@hostname will never work.
    – Kiwy
    Jun 14 at 12:11






  • 1




    I've edited your question to make it clearer. Relevant details should really be added to the question so that it can be answered without having to read the comments.
    – Anthony Geoghegan
    Jun 14 at 13:17










  • serverfault.com/q/879393/131555 interesting question with some background ;-)
    – Kiwy
    Jun 14 at 13:30












up vote
0
down vote

favorite









up vote
0
down vote

favorite











In systems such as Debian, there is a file /etc/adduser.conf which includes directive NAME_REGEX that can be used to define which characters are allowed in a username.



Is there a way to do this in CentOS 6.9? I can see that there is a file /etc/default/useradd but there is no indication anywhere in the documentation that it could support a similar directive.



I would like to be able to create a username with the @ sign in it, such as user@domain.com.







share|improve this question













In systems such as Debian, there is a file /etc/adduser.conf which includes directive NAME_REGEX that can be used to define which characters are allowed in a username.



Is there a way to do this in CentOS 6.9? I can see that there is a file /etc/default/useradd but there is no indication anywhere in the documentation that it could support a similar directive.



I would like to be able to create a username with the @ sign in it, such as user@domain.com.









share|improve this question












share|improve this question




share|improve this question








edited Jun 14 at 13:14









Anthony Geoghegan

7,16233651




7,16233651









asked Jun 14 at 11:41









Petr Břeň

1




1







  • 1




    what are your trying to achieve here ?
    – Kiwy
    Jun 14 at 12:00






  • 1




    I would like to be able to create a username with the '@' sign in it, such as user@domain.com
    – Petr Břeň
    Jun 14 at 12:09






  • 3




    dont do that. it will break so many thing for example you won't be able to connect via ssh on the machine because ssh user@domain@hostname will never work.
    – Kiwy
    Jun 14 at 12:11






  • 1




    I've edited your question to make it clearer. Relevant details should really be added to the question so that it can be answered without having to read the comments.
    – Anthony Geoghegan
    Jun 14 at 13:17










  • serverfault.com/q/879393/131555 interesting question with some background ;-)
    – Kiwy
    Jun 14 at 13:30












  • 1




    what are your trying to achieve here ?
    – Kiwy
    Jun 14 at 12:00






  • 1




    I would like to be able to create a username with the '@' sign in it, such as user@domain.com
    – Petr Břeň
    Jun 14 at 12:09






  • 3




    dont do that. it will break so many thing for example you won't be able to connect via ssh on the machine because ssh user@domain@hostname will never work.
    – Kiwy
    Jun 14 at 12:11






  • 1




    I've edited your question to make it clearer. Relevant details should really be added to the question so that it can be answered without having to read the comments.
    – Anthony Geoghegan
    Jun 14 at 13:17










  • serverfault.com/q/879393/131555 interesting question with some background ;-)
    – Kiwy
    Jun 14 at 13:30







1




1




what are your trying to achieve here ?
– Kiwy
Jun 14 at 12:00




what are your trying to achieve here ?
– Kiwy
Jun 14 at 12:00




1




1




I would like to be able to create a username with the '@' sign in it, such as user@domain.com
– Petr Břeň
Jun 14 at 12:09




I would like to be able to create a username with the '@' sign in it, such as user@domain.com
– Petr Břeň
Jun 14 at 12:09




3




3




dont do that. it will break so many thing for example you won't be able to connect via ssh on the machine because ssh user@domain@hostname will never work.
– Kiwy
Jun 14 at 12:11




dont do that. it will break so many thing for example you won't be able to connect via ssh on the machine because ssh user@domain@hostname will never work.
– Kiwy
Jun 14 at 12:11




1




1




I've edited your question to make it clearer. Relevant details should really be added to the question so that it can be answered without having to read the comments.
– Anthony Geoghegan
Jun 14 at 13:17




I've edited your question to make it clearer. Relevant details should really be added to the question so that it can be answered without having to read the comments.
– Anthony Geoghegan
Jun 14 at 13:17












serverfault.com/q/879393/131555 interesting question with some background ;-)
– Kiwy
Jun 14 at 13:30




serverfault.com/q/879393/131555 interesting question with some background ;-)
– Kiwy
Jun 14 at 13:30















active

oldest

votes











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%2f449784%2fhow-to-configure-which-characters-are-allowed-in-centos-usernames%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes










 

draft saved


draft discarded


























 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f449784%2fhow-to-configure-which-characters-are-allowed-in-centos-usernames%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?