workaround for RedHat 9 that does not allow usernames with dot

Please help me with telling me a script or a way to make usernames with dot in the middle in Redhat 9 to use with sendmail.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi msl110,

Put it in your /etc/aliases file:

e.g.: user account= xx, dotname= Xenia.Xylophone

Xenia.Xylophone xx

Kind regards,

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
msl110Author Commented:
No I meant make a user with a dot in the middle of the username as we want to use, please advise.

The suggestion from svenkarlsen is valid. I don't think you can have dots in the usernames. Adding aliases as suggsted
will make it possible to use bill.adams@.... as a mail address, even if the person has a username like billyboy or whatever.

I use this system and I see no problem with it. Of course it makes it possible to send an e-mail to "username@..." as well
as to "firstname.lastname@..." and both addresses are valid.
Active Protection takes the fight to cryptojacking

While there were several headline-grabbing ransomware attacks during in 2017, another big threat started appearing at the same time that didn’t get the same coverage – illicit cryptomining.

msl110Author Commented:
ok will try and tell you, thanks Sadiq

redhat it self allows .'s in the username to the machine, sendmail maybe different:

[root@woo root]# useradd bill.smith
[root@woo root]# passwd bill.smith
Changing password for user bill.smith.
New password:
BAD PASSWORD: it is too short
Retype new password:
passwd: all authentication tokens updated successfully.
[root@woo root]# su - bill.smith
[bill.smith@woo bill.smith]$
msl110Author Commented:
RedHat 9 does not, have you tried this with RedHat 9, it does not permit (dot) in usernames.
Hmm, when we had this conversation beforeI really thought we concluded redhat 9 did, perhaps that was an upgrade to redhat 9 instead of a clean install -- I'm not really sure -- I'll have a look around and see if I can find that conversation.

svenkarlsen is right though, the preferred method is to create a uset bsmith and then in the aliases file add bill.smith bsmith

I really thought there was a more elegant way,  but you can do

useradd bill
and then edit /etc/password and /etc/shadow and change bill to bill.smith  -- even adding this to a script to make your life easier.

but that's not the best idea, it can break some other things
well majorwoo no offence just wanna to let you know, I did a test in a clean installed RH9.0, the result as below.

[root@test build]# useradd paul.lam
useradd: invalid user name 'paul.lam'

I try many options to make it work, but still no goal.

I agree with svenkarlsen's suggestion about the aliase method, I did that for my company email address setup, like my login is 'paul' and my email address is, and it's work fine.

what I did is add the entry into the /etc/aliases like

paul.lam: paul

after save, run the newaliases, that all.
msl110Author Commented:
Dear Sven, Majorwoo, Rid  and Paullamhkg thanks for all your inputs, its great being here, I will try both the options, I wil first install  fresh Red Hat 7.3 on a box and and then upgrade it to RedHat 9 and see if it works, if it does great, if it does not,  then I will make the aliases file as you all have suggested. I have searched the net and found that there is this thing that developers have blocked usernames with dot in RedHat9, waht could be the reason and they say there might be to aviod other problems with usernames, so RedHat does not support dot. Must be valid reasons.

But please tell me what does RUN the newaliases mean, how does one do that?  I will need to move my previous users and their hoem directories and passwords form the RedHat 7.3 Box to the the Redhat 9.0 box, is there a script or some good great way to do this. Migration tool kid of thing. thanks for all your commnets.


That thread has some info in it regarding the naming issue.
msl110: i wouldn't try doing and upgrade to rh9 as I am not sure that it worked, I just remember this coming up before and I was pretty sure that I was ablel to do it on the rh9 box I had upgraded -- but since I don't have access to those anymore (new job) i wouldn't do it, I would use the alias solution (after all, its the correct way)
Karl Heinz KremerCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Answered by svenkarlsen
Please leave any comments here within the next four days.


EE Cleanup Volunteer
If you are using old unix style password file, and maybe shadow file enabled, then you can do it by hand:
these two files contain the users' account information. You can edit by hand. For example if you want to add a user with username bill.smith, then you can do this:

add the line to the /etc/passwd file using "vi" or "pico" like this:
here 204 is the user ID, you can make it anything different than others. 200 is the group ID, also you can make it anything you want, i suggest a different number than others.

then edit the /etc/shadow file like:
format is:

also create the user group for the user:
edit /etc/group file like:

now you change the password of the user using the command "passwd bill.smith"

Dont forget to "su root" before making all those events.

This is the hard but deep solution :)

Thanks but someone already pointed that out ;-)

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Distributions

From novice to tech pro — start learning today.