Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

replicating an aliase file

Status
Not open for further replies.

smith364

IS-IT--Management
Jun 26, 2001
34
US
Can I replicate an aliase file from one AIX server to another? Must I maintain these files like you would host files. This is for sendmail. We would like to aliase people at their facility rather than aliase every user at a central location.
 
Nothing stopping you from doing this. Simply copy the file to the other server and issue the "newalaliases" command afterwards to make it active.

I keep a copy of all such files in a central repository on a seperate server, and by using rdist distribute them to the servers involved. It makes it easier to maintain, only one file to edit.

IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
MS Certified Windblows Rebooter
 
After you told something about "rdist" I had a look into the manpages. Seems to be a very interesting mechanism.

Are you able to give me a short example distfile and
the needed usage of "rdist" in order to distribute something?

My first experiments didn't work... without error messages.
Are there additional configurations on AIX in order to get it work?

regards
Ruediger
 
Fairly simple. Create a file called whatever, in my case I called it "dfile"

Place this in the file, replacing the local path and remote server name with your details:

/local/path/to/file/aliases-> remote_server_name
install /etc/aliases ;
special "newaliases" ;

Make sure the aliases file has the same permissions and ownership as the file on the remote server else you will get errors.

To verify without update: rdist -vf /path/to/dfile
To execute: rdist -f /path/to/dfile

Rdist can be used more securely via ssh, but it is necessary to use non-password authentication (i.e. public key/knownhosts) as you cannot pass passwords. To do this use the following:

rdist -P /usr/local/bin/ssh -f /path/to/dfile

I simply created a script called sdist with this in it and place it in /usr/bin:

rdist -P /usr/local/bin/ssh $1 $2

IBM Certified Confused - MQSeries
IBM Certified Flabbergasted - AIX 5 pSeries System Administration
MS Certified Windblows Rebooter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top