LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 02-09-2005, 08:12 AM   #1
AZIMBD03
Member
 
Registered: Oct 2003
Location: Dhaka,Bangladeh
Distribution: Red Hat
Posts: 80

Rep: Reputation: 15
Question auto mail to new user how to??


Hi all

I am using RH 9.0 server.I am looking for a scrip by which a auto mail generated to new user with a welcome msg from a user ID "system admin"

I meant when ever a new user will be created in this server then this srcipt will mail to this user from 'systemadmin" user ID for first time.

Can you help me to make like that scrip???

Thanks

BOOST
 
Old 02-12-2005, 10:34 AM   #2
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
It's probably better to do it the other way around - write a script for creating new users that also sends a mail to the new user account after it has been created.

That way you can manage creating users exactly as you want.
 
Old 02-12-2005, 11:32 AM   #3
AZIMBD03
Member
 
Registered: Oct 2003
Location: Dhaka,Bangladeh
Distribution: Red Hat
Posts: 80

Original Poster
Rep: Reputation: 15
Do u have any idea to make like that script....I am looking for you help plz
 
Old 02-12-2005, 04:41 PM   #4
hob
Senior Member
 
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
The easiest way is to write a shell script that uses the 'useradd' and 'mail' commands. Use the 'crypt' command to turn the password into encrypted form for useradd.

Shell script tutorial:

www.linuxcommand.org

Shell scripting is *very* easy and very useful, so it's worth going through the tutorial and learning yourself, rather than just copying somebody else's. If you can't make it work then post your script to a forum and somebody can give you exact help.

Last edited by hob; 02-12-2005 at 04:44 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
coding problem on php auto send mail after a period akamaru607 Programming 12 09-01-2005 07:48 AM
Help for SENDMAIL, . . . auto sending mail ERBRMN Linux - Security 6 07-06-2005 09:21 PM
Mail going to /var/spool/mail/user and not to Thunderbird pracslipkerm Linux - Newbie 4 06-21-2005 05:58 AM
Auto Login User ImpactDNI Linux - Software 7 04-21-2005 03:28 PM
Auto ip mail from server secrets Linux - Networking 2 06-23-2003 12:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 07:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration