Link to home
Start Free TrialLog in
Avatar of msl110
msl110

asked on

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

ASKER CERTIFIED SOLUTION
Avatar of svenkarlsen
svenkarlsen

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of msl110
msl110

ASKER

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
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
Avatar of msl110

ASKER

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]$
Avatar of msl110

ASKER

RedHat 9 does not, have you tried this with RedHat 9, it does not permit (dot) in usernames.
regards
Sadiq
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 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.
Avatar of msl110

ASKER

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

Thanks but someone already pointed that out ;-)

majorwoo