Create user with a period in the user name on CentOS 7

0

I need to create users with periods in their names on CentOS7.

For example, joe.blow@foo.com. It looks like this is technically supported but adduser/useradd have a regex which is preventing this. I've seen people suggest creating them without the periods and then manually adding them in /etc/passwd /etc/shadow etc. I need to create them in a script so any manual process is no bueno.

It looks like this is possible on Ubuntu as it provides /etc/adduser.conf which externally defines the regex used by adduser so that one can customize the behavior.

Any thoughts on how to do this or tools? Dr. Google has failed me :-)

NBW

Posted 2017-01-05T02:52:20.393

Reputation: 101

Answers

0

If it's for email purposes then you can create normal usernames and use email aliases for period in email address.

andrej

Posted 2017-01-05T02:52:20.393

Reputation: 422

0

I ended up recompiling the CentOS 7 shadow-utils SRPM which has these tools in to so that they would support user names with @ symbols in them.

NBW

Posted 2017-01-05T02:52:20.393

Reputation: 101