* best way to synch passwd file between 2 systems
@ 2002-08-12 15:10 dJon'Z
2002-08-12 15:30 ` Marre des Spameurs qui prennent les add dans les news [SauroN]
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: dJon'Z @ 2002-08-12 15:10 UTC (permalink / raw)
I've just set up a TruCluster v1.6 on two Tru64 4.0g boxes. Since I've got
two separate systems with two /etc/passwd files to maintain, I want to
regularly synch the two files.
My thought is to run a cron script daily, use rsh and rcp to check which
version is newer, and copy that version to the second system.
It's not foolproof, but I'm not worried if the cluster switches hosts since
I'll know that. I may have an id or two that in not synched due to the
timing of the file copy, but that is a very minor issue.
My question is: can I copy the password file without a problem? I know I
should use vipw to edit the file and have it maintained, which got me
wondering if I could overlay the /etc/passwd file or do I need to do
something special?
I recall something about a makehash command and think I may need this as
well.
Anyone have any thoughts, or better ideas, to keep my two systems at the
same user password level?
thanks - Dale
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: best way to synch passwd file between 2 systems
2002-08-12 15:10 best way to synch passwd file between 2 systems dJon'Z
@ 2002-08-12 15:30 ` Marre des Spameurs qui prennent les add dans les news [SauroN]
2002-08-12 15:46 ` Brian Haley
2002-08-12 16:34 ` Paul A Sand
2 siblings, 0 replies; 5+ messages in thread
From: Marre des Spameurs qui prennent les add dans les news [SauroN] @ 2002-08-12 15:30 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1166 bytes --]
"dJon'Z" <dalejava@freeshell.org> a �crit dans le message de news:
aj8j60$18u9v9$1@ID-126742.news.dfncis.de...
| I've just set up a TruCluster v1.6 on two Tru64 4.0g boxes. Since I've
got
| two separate systems with two /etc/passwd files to maintain, I want to
| regularly synch the two files.
|
| My thought is to run a cron script daily, use rsh and rcp to check which
| version is newer, and copy that version to the second system.
|
| It's not foolproof, but I'm not worried if the cluster switches hosts
since
| I'll know that. I may have an id or two that in not synched due to the
| timing of the file copy, but that is a very minor issue.
|
| My question is: can I copy the password file without a problem? I know I
| should use vipw to edit the file and have it maintained, which got me
| wondering if I could overlay the /etc/passwd file or do I need to do
| something special?
|
| I recall something about a makehash command and think I may need this as
| well.
|
u can use a CVS system for all ur config file for /etc
| Anyone have any thoughts, or better ideas, to keep my two systems at the
| same user password level?
|
| thanks - Dale
|
|
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: best way to synch passwd file between 2 systems
2002-08-12 15:10 best way to synch passwd file between 2 systems dJon'Z
2002-08-12 15:30 ` Marre des Spameurs qui prennent les add dans les news [SauroN]
@ 2002-08-12 15:46 ` Brian Haley
2002-08-12 23:52 ` Nico Kadel-Garcia
2002-08-12 16:34 ` Paul A Sand
2 siblings, 1 reply; 5+ messages in thread
From: Brian Haley @ 2002-08-12 15:46 UTC (permalink / raw)
dJon'Z wrote:
> Anyone have any thoughts, or better ideas, to keep my two systems at the
> same user password level?
Use NIS.
-Brian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: best way to synch passwd file between 2 systems
2002-08-12 15:10 best way to synch passwd file between 2 systems dJon'Z
2002-08-12 15:30 ` Marre des Spameurs qui prennent les add dans les news [SauroN]
2002-08-12 15:46 ` Brian Haley
@ 2002-08-12 16:34 ` Paul A Sand
2 siblings, 0 replies; 5+ messages in thread
From: Paul A Sand @ 2002-08-12 16:34 UTC (permalink / raw)
In article <aj8j60$18u9v9$1@ID-126742.news.dfncis.de>, dJon'Z wrote:
> I've just set up a TruCluster v1.6 on two Tru64 4.0g boxes. Since I've got
> two separate systems with two /etc/passwd files to maintain, I want to
> regularly synch the two files.
>
> My thought is to run a cron script daily, use rsh and rcp to check which
> version is newer, and copy that version to the second system.
You might want to check using ssh/scp instead.
> It's not foolproof, but I'm not worried if the cluster switches hosts since
> I'll know that. I may have an id or two that in not synched due to the
> timing of the file copy, but that is a very minor issue.
>
> My question is: can I copy the password file without a problem? I know I
> should use vipw to edit the file and have it maintained, which got me
> wondering if I could overlay the /etc/passwd file or do I need to do
> something special?
I'd recommend doing something special. Think about crashes (on either
system) during the copy. Or an accidently-filled root filesystem on
the copied-to system.
You want to make the switchover from old to new
versions of the file as atomic as possible, I think. Here's
what we do:
copy the new file to /etc/passwd.NEW
link this to /etc/ptmp (this should lock the existing passwd file)
unlink /etc/passwd.OLD (if it exists)
link /etc/passwd to /etc/passwd.OLD
rename /etc/ptmp to /etc/passwd
run /usr/sbin/mkpasswd on /etc/passwd
You probably should check each step for errors and bail if you
detect any.
As another poster pointed out, NIS is an option. [We did the
above after giving up on NIS, though.]
--
-- Paul A. Sand | Anything worth doing well
-- University of New Hampshire | is worth doing slowly.
-- pas@unh.edu | (Gypsy Rose Lee)
-- http://pubpages.unh.edu/~pas |
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: best way to synch passwd file between 2 systems
2002-08-12 15:46 ` Brian Haley
@ 2002-08-12 23:52 ` Nico Kadel-Garcia
0 siblings, 0 replies; 5+ messages in thread
From: Nico Kadel-Garcia @ 2002-08-12 23:52 UTC (permalink / raw)
"Brian Haley" <Brian.Haley@hp.com> wrote in message
news:3D57D6B9.8806E375@hp.com...
> dJon'Z wrote:
>
> > Anyone have any thoughts, or better ideas, to keep my two systems at the
> > same user password level?
>
> Use NIS.
>
> -Brian
No good for root and system passwords: it won't replace the *current*
entries, and you have to have those entries to be able to boot the machine.
I would use "rsync" to a shared repository and a nightly alert if there's a
discrepancy. An automated update of /etc/passwd just sounds a bit dangerous,
unless you have a large community of users needing network assigned
passwords. In that case, consider moving their network account information
*out* of /etc/passwd to a distinct file....
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-08-12 23:52 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-12 15:10 best way to synch passwd file between 2 systems dJon'Z
2002-08-12 15:30 ` Marre des Spameurs qui prennent les add dans les news [SauroN]
2002-08-12 15:46 ` Brian Haley
2002-08-12 23:52 ` Nico Kadel-Garcia
2002-08-12 16:34 ` Paul A Sand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox