On Tue, Oct 12, 2010 at 1:56 PM, sync jiannma@gmail.com wrote:
On Tue, Oct 12, 2010 at 1:36 PM, John R Pierce pierce@hogranch.comwrote:
On 10/11/10 10:34 PM, sync wrote:
What you said is right . I'm trying to write a script to create the new account and his password and then can email them .
By the way , My Mail server is not the Linux Server(CentOS) , it is the Windows 2003 Server . So how can I do that ?
hire a windows scripting programmer who's familiar with whatever email server you're running, and whatever LDAP service you're using.
you're way WAY off topic for this list.
Maybe what i said is not clear, because my English is too pool . Please forgive me if my expression is not precise.
The following is my environment :
Workspace Environment : CentOS 5.5 64bits , Using Openldap Server or 389 LDAP Server
Mail Server : Windows Mail Server
I am looking for the method that after I create the new account on the Openldap Server , then use the script to auto send an E-mail to him . Of course, these actions may used into one script .
For example :
If I create the new account called Tim on LDAP Server , and his password is 123456 , and his mail address is tim@test.com Then will send an E-mail to him to notice his information , like his name and his passowrd.
So Would someone can give some suggestions ?
Maybe what i said is not clear, because my English is too pool . Please forgive me if my expression is not precise.
Doesn't matter what mail server you use, email is email.
The following is my environment : Workspace Environment : CentOS 5.5 64bits , Using Openldap Server or 389 LDAP Server Mail Server : Windows Mail Server For example : If I create the new account called Tim on LDAP Server , and his password is 123456 , and his mail address is tim@test.com <mailto:tim@test.com> Then will send an E-mail to him to notice his information , like his name and his passowrd. So Would someone can give some suggestions ?
Before we go any further on this, I'd like to give a very serious warning. It is NEVER a good idea to email a password. Email is, by definition, insecure.
I'm not familiar with 389 LDAP Server, and after a quick look, it would make sense for me to read up on it. Anyhow, my advice is going to come from the OpenLDAP side of things.
I would:
1. Set up OpenLDAP (make sure to get a real certificate and require TLS/SSL) 2. If using Samba, set up the smbldap tools (http://en.wikipedia.org/wiki/Smbldap-Tools), can be useful even if not using samba... 3. Start script (I'd use perl, since it's what I'm most familiar with) 1. Generate username (either collect from input or generate somehow 2. Generate password (There's a sub for that on the page referenced earlier) 3. Contemplate making sure that the username is unique, and group membership, etc. 4. call smbldap-useradd to add the user (add stuff like -m for the mail address, check the smbldap-useradd documentation for handy switches 5. Compose body of email to user (this is probably mostly static, but you will most likely want to substitute some variables like username, etc 6. send the email (sub on the page earlier) 7. I repeat, please don't email passwords... have them call you for them or something... email is the least secure thing on the damn planet 4. Sit back and have a beer, cuz yer done
I'm happy to help if you need more.
Cheers, Sean
On Tue, Oct 12, 2010 at 2:38 PM, Sean Hart boardnutz@blacklight.net wrote:
Maybe what i said is not clear, because my English is too pool . Please forgive me if my expression is not precise.
Doesn't matter what mail server you use, email is email.
The following is my environment :
Workspace Environment : CentOS 5.5 64bits , Using Openldap Server or 389 LDAP Server
Mail Server : Windows Mail Server
For example :
If I create the new account called Tim on LDAP Server , and his password is 123456 , and his mail address is tim@test.com Then will send an E-mail to him to notice his information , like his name and his passowrd.
So Would someone can give some suggestions ?
Before we go any further on this, I'd like to give a very serious warning. It is NEVER a good idea to email a password. Email is, by definition, insecure.
Thanks for your advice . This is a test for the our company Intranet .
I'm not familiar with 389 LDAP Server, and after a quick look, it would make sense for me to read up on it. Anyhow, my advice is going to come from the OpenLDAP side of things.
I would:
- Set up OpenLDAP (make sure to get a real certificate and require
TLS/SSL) 2. If using Samba, set up the smbldap tools ( http://en.wikipedia.org/wiki/Smbldap-Tools), can be useful even if not using samba... 3. Start script (I'd use perl, since it's what I'm most familiar with) 1. Generate username (either collect from input or generate somehow 2. Generate password (There's a sub for that on the page referenced earlier) 3. Contemplate making sure that the username is unique, and group membership, etc. 4. call smbldap-useradd to add the user (add stuff like -m for the mail address, check the smbldap-useradd documentation for handy switches 5. Compose body of email to user (this is probably mostly static, but you will most likely want to substitute some variables like username, etc 6. send the email (sub on the page earlier) 7. I repeat, please don't email passwords... have them call you for them or something... email is the least secure thing on the damn planet 4. Sit back and have a beer, cuz yer done
I'm happy to help if you need more.
I found the solution for sending mail to the new account .
It may use the perl script which calls the Net::SMTP module or Mail::Sender module or Mail::Sendmail module to finish that .
And I had a test just now and this is ok .
Thanks all ..
Cheers, Sean
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos