From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Taylor Subject: Re: Script to edit /etc/aliases file Date: Wed, 22 Oct 2003 08:10:00 -0700 Sender: linux-admin-owner@vger.kernel.org Message-ID: <5.2.1.1.0.20031022080250.0221b158@mustang> References: Mime-Version: 1.0 Return-path: In-Reply-To: List-Id: Content-Type: text/plain; charset="us-ascii"; format="flowed" Content-Transfer-Encoding: 7bit To: linux-admin@vger.kernel.org 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"