LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   find out email address from username (https://www.linuxquestions.org/questions/linux-networking-3/find-out-email-address-from-username-375049/)

syrotkin 10-20-2005 09:09 AM

find out email address from username
 
hello,

I am trying to generate a mailing list using the /etc/passwd file, going through the list of users, and appending @foo or @bar to the usernames. The problem is that I don't know how to find out what string I need to append because the users may have their email addresses on different servers.
Maybe there is a command that lets you find out a user's email address if you know their username (finger does not do that, it just gives the person's name)

thank you

fouldsy 10-20-2005 01:21 PM

You could script it so it grabs the hostname of the server connected to and appends this to the end of the usernames found in whatever location the login data is stored depending on authentication method. Don't know anything that holds the whole e-mail address for individual users like a global mail address book for local systems. A quick script would do it though.

syrotkin 10-20-2005 04:32 PM

mm yeah, the problem is I don't know the name of the server it is connected to. Let's say I am searching in the /etc/passwd file of the server aaa, and the users listed in the file have their email addresses @bbb or @ccc, and I don't know which of the two it is.


All times are GMT -5. The time now is 11:39 AM.