L'ardoise eduvax

Blog, free software projects, computer tips and more

Tinis - Tiny and simplistic Network Information System

Written by Sebastien Devaux - - no comments

Tinis is a small script to suppport sharing of some data among few hosts of a small network. It is designed to be as simple as possible to avoid the management overload of the widely used network information systems such as NIS, DNS, LDAP, that are also sometime a bit tricky to setup.

If you have only a reduce set of host that have to share a few data table (typically some parts of /etc files like /etc/passwd for logins), and don't want to setup huge things trying to integrate nss, ldap, NIS or samba, tinis can help you. Tinis is just a script able to patch any file using tag in-closed in comments to insert data from another (remote) file section. It can update a single file or update a file set defined in the only configuration file /etc/tinis.conf.

How to use tinis :

  • download tinis and copy it in an appropriate location of you file system (personally I choose /sbin) and set executable.
  • for each file to be patched by tinis, add some tinis tags to define tinis managed sections :
#<< section\_name host:source\_file\_path
#>> section\_name
  • on the remote host provide source data, define inside each file containing to be shared data the shared section (yes you can share only part of a file) :
#<< section\_name 
... shared data ...
#>> section\_name
  • trigger a file update :
$ tinis /path/of/file/to/update
  • trigger a file set (defined in /etc/tinis.conf, one file per line)
$ tinis update
  • as tinis use scp to fetch remote files containg source data, you may need to share public key across your hosts to grant file copy without password entry.

  • automate file update : regarding the update policy you want to set up use cron or sysinit scripts to invoke automatically tinis update each time you need.

Example: Here is how to configure your /etc/hosts files to use tinis as a dummy DNS to share IP addresses of 3 host (alpha, beta and gamma), where alpha is the hosts name database master and plop the internal domain name.

alpha:/etc/hosts

127.0.0.1 alpha localhost
#<< plop
192.168.0.1 alpha alpha.plop
192.168.0.2 beta beta.plop
192.168.0.3 gamma gamma.plop
#>> plop

beta:/etc/hosts

127.0.0.1 beta localhost
#<< plop 192.168.0.1:/etc/hosts
#>>

gamma:etc/hosts

127.0.0.1 gamma localhost
#<< plop 192.168.0.1:/etc/hosts
#>>

The Tinis script is free software, feel free to use, modify, and distribute, see GPL V2 for detailed information about granted rights of use.

Write a comment