[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sending a mail message to a new user when account has been created




On 23 Feb 2002, Oliver Elphick wrote:

> On Sat, 2002-02-23 at 18:42, Faheem Mitha wrote:
> >
> > Dear People,
> >
> > I'm adminstering a small Debian system and I want to know how to
> > automatically send new users a README in the form of an email when their
> > account has been created. What would be an elegant way of doing this? I
> > did a perfunctory search for this in Google but didn't come up with
> > anything. I can think of some not very elegant methods, but I'm sure this
> > has come up before, so there must be a good way of handling it.
>
> In your account creation script:
>
>   cat README | mail -e -s "Subject of your message" new_user@address

Would /usr/local/sbin/adduser.local be an appropriate place to put this?

Man adduser says " If the file /usr/local/sbin/adduser.local exists, it
will be executed after the user account has been set up in order to do any
local setup.  The arguments passed to adduser.local are:  username uid gid
home-directory".

So perhaps something like

cat README | mail -e -s "please read this information for new users" username@localhost  ?

Thanks for your reply.

                                                                  Faheem.



Reply to: