All of lore.kernel.org
 help / color / mirror / Atom feed
* Script to edit /etc/aliases file
@ 2003-10-22 14:55 David Tice
  2003-10-22 15:08 ` Matthew Harrison
  0 siblings, 1 reply; 4+ messages in thread
From: David Tice @ 2003-10-22 14:55 UTC (permalink / raw)
  To: linux-admin

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?

TIA 

David Tice
System Administrator
Wheaton College
508.286.3406
dtice@wheatonma.edu


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Script to edit /etc/aliases file
  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
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Harrison @ 2003-10-22 15:08 UTC (permalink / raw)
  To: David Tice; +Cc: linux-admin

[-- Attachment #1: Type: text/plain, Size: 1218 bytes --]

On Wed, Oct 22, 2003 at 10:55:25AM -0400, 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?

Hi David,
  A little while ago, I wrote some perl scripts that take a text file
with usernames like so:

<user file>
user1
user2
user3
</user file>

then creates the unix account, sets a default password, sets up the
sendmail virtusertable, and a few other things. You should be able to
use it to create the aliases file instead of the virtusertable without
much trouble.

I will send it over when I get home (I'm at work now), in a couple of
hours.

HTH

-- 
Mat Harrison			| email: matth@3d-computers.co.uk
3d Computer Systems Ltd.	| tel: ++441249 460 766
11 New Road			| fax: ++441249 460 583 
Chippenham			| gpgid: 0x9FE38627
Wiltshire
SN13 9RW
England

[-- Attachment #2: Type: application/pgp-signature, Size: 187 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Script to edit /etc/aliases file
  2003-10-22 15:08 ` Matthew Harrison
@ 2003-10-23  6:26   ` Horia Chirculescu
  0 siblings, 0 replies; 4+ messages in thread
From: Horia Chirculescu @ 2003-10-23  6:26 UTC (permalink / raw)
  To: Matthew Harrison; +Cc: linux-admin

Which are the few 'other' things that your script do?

                           ____    ____    o           ~ 
               //     //  / __ \  //   \  // //''''  //\\
              //_____//  / / / / //___ / // //      //  \\
             //     //  / /_/ / // \    // //      //____\\ 
            //     //   \____/ //   \  //  \\.... //      \\
 ------------------------------------------------------------------------
                          Comtec Net Romania
           ----------------------------------------------------
         WEB: www.eltop.ro IRC: irc.eltop.ro NEWS: news.eltop.ro
           ----------------------------------------------------
                    Horia Chirculescu root@eltop.ro
                        Connex: +40 723 205 086
			Zapp:   +40 788 374 059

On Wed, 22 Oct 2003, Matthew Harrison wrote:

> On Wed, Oct 22, 2003 at 10:55:25AM -0400, 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?
> 
> Hi David,
>   A little while ago, I wrote some perl scripts that take a text file
> with usernames like so:
> 
> <user file>
> user1
> user2
> user3
> </user file>
> 
> then creates the unix account, sets a default password, sets up the
> sendmail virtusertable, and a few other things. You should be able to
> use it to create the aliases file instead of the virtusertable without
> much trouble.
> 
> I will send it over when I get home (I'm at work now), in a couple of
> hours.
> 
> HTH
> 
> -- 
> Mat Harrison			| email: matth@3d-computers.co.uk
> 3d Computer Systems Ltd.	| tel: ++441249 460 766
> 11 New Road			| fax: ++441249 460 583 
> Chippenham			| gpgid: 0x9FE38627
> Wiltshire
> SN13 9RW
> England
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Script to edit /etc/aliases file
       [not found] <Pine.LNX.4.44.0310221048300.3847-100000@acunix.wheatonma.e du>
@ 2003-10-22 15:10 ` Scott Taylor
  0 siblings, 0 replies; 4+ messages in thread
From: Scott Taylor @ 2003-10-22 15:10 UTC (permalink / raw)
  To: linux-admin

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"


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-10-23  6:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
     [not found] <Pine.LNX.4.44.0310221048300.3847-100000@acunix.wheatonma.e du>
2003-10-22 15:10 ` Scott Taylor

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.