Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 537
  • Last Modified:

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

0
msl110
Asked:
msl110
  • 4
  • 4
  • 2
  • +4
1 Solution
 
svenkarlsenCommented:
Hi msl110,

Put it in your /etc/aliases file:

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

/etc/aliases:
Xenia.Xylophone xx


Kind regards,
Sven
0
 
msl110Author Commented:
No I meant make a user with a dot in the middle of the username as we want to use
bill.adams@microsoft.com, please advise.


thanks
Sadiq
0
 
ridCommented:
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.
/RID
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

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

0
 
majorwooCommented:
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]$
0
 
msl110Author Commented:
RedHat 9 does not, have you tried this with RedHat 9, it does not permit (dot) in usernames.
regards
Sadiq
0
 
majorwooCommented:
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
0
 
paullamhkgCommented:
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 paul.lam@mydomain.com, 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.
0
 
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.

regards
Sadiq
0
 
ridCommented:
http://www.experts-exchange.com/Operating_Systems/Linux/Q_20703716.html

That thread has some info in it regarding the naming issue.
/RID
0
 
majorwooCommented:
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)
0
 
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.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

khkremer
EE Cleanup Volunteer
0
 
tolgadalkilicCommented:
If you are using old unix style password file, and maybe shadow file enabled, then you can do it by hand:
/etc/password
/etc/shadow
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:
bill.smith::x:204:200::/home/billsmith:/bin/bash
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:
bill.smith::11694:0:99999:7:::
format is:
Username:password:lastchange:min:max:warn:inactive:expire:

also create the user group for the user:
edit /etc/group file like:
bill.smith::x:12349:

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 :)
0
 
majorwooCommented:
tolgadalkilic,

Thanks but someone already pointed that out ;-)

majorwoo
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

  • 4
  • 4
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now