linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Scott Taylor <scott@dctchambers.com>
To: linux-admin@vger.kernel.org
Subject: Re: Script to edit /etc/aliases file
Date: Wed, 22 Oct 2003 08:10:00 -0700	[thread overview]
Message-ID: <5.2.1.1.0.20031022080250.0221b158@mustang> (raw)
In-Reply-To: <Pine.LNX.4.44.0310221048300.3847-100000@acunix.wheatonma.e du>

At 07:55 AM 10/22/2003, David Tice wrote:
>We add new users through a script that  sets up home directories on
>different machines. If they are a student they on one machine if they are
>faculty they are on different and so on. Our mail comes into one machine
>and then sent to where their home directory lives. ( I did not set it up
>this way but I have to deal with it)  I need to set up aliases for everyone
>  who is new and I am doing it by hand.
>Does anyone have a script that I can use?

just add the line to your current (bash/sh?) script.

echo -e "$NewUserName:\t$NewUserName@$NewUserMachine" >> /etc/aliases

Of course you probably have some other varables to represent $NewUserName 
and $NewUserMachine.  Then just run "newaliases"


       reply	other threads:[~2003-10-22 15:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.44.0310221048300.3847-100000@acunix.wheatonma.e du>
2003-10-22 15:10 ` Scott Taylor [this message]
2003-10-22 14:55 Script to edit /etc/aliases file David Tice
2003-10-22 15:08 ` Matthew Harrison
2003-10-23  6:26   ` Horia Chirculescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5.2.1.1.0.20031022080250.0221b158@mustang \
    --to=scott@dctchambers.com \
    --cc=linux-admin@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).