Re: Script to edit /etc/aliases file

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

 



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"

-
: send the line "unsubscribe linux-admin" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Newbie]     [Audio]     [Hams]     [Kernel Newbies]     [Util Linux NG]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Device Drivers]     [Samba]     [Video 4 Linux]     [Git]     [Fedora Users]

  Powered by Linux