Solved

workaround for RedHat 9 that does not allow usernames with dot

Posted on 2003-11-14
17
516 Views
Last Modified: 2013-12-06
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
Comment
Question by:msl110
  • 4
  • 4
  • 2
  • +4
17 Comments
 
LVL 9

Accepted Solution

by:
svenkarlsen earned 100 total points
ID: 9746463
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
 

Author Comment

by:msl110
ID: 9746749
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
 
LVL 31

Expert Comment

by:rid
ID: 9746970
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
 

Author Comment

by:msl110
ID: 9747103
ok will try and tell you, thanks Sadiq

0
 
LVL 9

Expert Comment

by:majorwoo
ID: 9748379
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
 

Author Comment

by:msl110
ID: 9749899
RedHat 9 does not, have you tried this with RedHat 9, it does not permit (dot) in usernames.
regards
Sadiq
0
 
LVL 9

Expert Comment

by:majorwoo
ID: 9750893
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 12

Expert Comment

by:paullamhkg
ID: 9752488
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
 

Author Comment

by:msl110
ID: 9753009
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
 
LVL 31

Expert Comment

by:rid
ID: 9753198
http://www.experts-exchange.com/Operating_Systems/Linux/Q_20703716.html

That thread has some info in it regarding the naming issue.
/RID
0
 
LVL 9

Expert Comment

by:majorwoo
ID: 9754593
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
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10303360
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
 
LVL 3

Expert Comment

by:tolgadalkilic
ID: 10432187
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
 
LVL 9

Expert Comment

by:majorwoo
ID: 10432389
tolgadalkilic,

Thanks but someone already pointed that out ;-)

majorwoo
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now