Jeff Abrahamson on Thu, 17 Apr 2003 08:01:06 -0400


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

Re: [PLUG] Two passwd files?


On Wed, Apr 16, 2003 at 10:57:23PM -0400, Paul wrote:
>   [13 lines, 85 words, 706 characters]  Top characters: _tsinelo
> 
> I want to use rsync and ssh to push the passwd file (and others) as an 
> alternative to NIS.  The question is, is it possible to have a "local" 
> passwd file as an extension to the pushed passwd file?  For example, to 
> have a local root account which is only valid on a particular machine?
> 
> The config that I will be using is a variation of the approach detailed 
> at http://www.ussg.iu.edu/security/rsync.html

You could post-process locally with sed to change the root line:

On local host:

    ssh $central:/etc/passwd /etc/passwd.template
    sed < /etc/passwd.template > /etc/passwd.root script
    mv /etc/passwd.root /etc/passwd

Assuming your constitution can take all this moving about without
excessive adrenaline or high blood pressure.  Needless to say, you
want to make sure an error at one step of the chain can't leave you
without a passwd file.

-- 
 Jeff

 Jeff Abrahamson  <http://www.purple.com/jeff/>
 GPG fingerprint: 1A1A BA95 D082 A558 A276  63C6 16BF 8C4C 0D1D AE4B

Attachment: pgpeozJAYylch.pgp
Description: PGP signature