[KLUG Members] Time to rebuild

Andrew Thompson members@kalamazoolinux.org
01 Sep 2003 16:21:48 -0400


On Mon, 2003-09-01 at 14:59, Adam Williams wrote:
> > > Don't reformat /home and you should be fine on all above accounts.
> > Okay, question on this: if everything EXCEPT /home is reformatted, are
> > account names lost? 
> 
> Yes.
> 
> > Is there a 'best' way to restore them if this is the case? 
> 
> Don't use /etc/passwd,  use LDAP. :)  

That's... a ways down the line yet. *grin*

> OR you can make a copy of /etc/passwd & /etc/group before you nuke /. 
> THen use adduser and friends to put them back.  

I really have only two user accounts defined on this machine, one of
which could disappear with no tears shed. I'm mainly just curious about
handling multiple accounts in such a situation. If there were more than
a few (like, three or more. I'm lazy), a script or other 'automagical'
solution would be most appealing.

> If you've got lots of users, then ask yourself why your nuking the box,
> and is there a better way.

See above, but that's really another question, one to which I haven't
really seen many good answers beyond what little I've managed to find on
the web: how to set up several machines on a network so one can log in
at any one and see essentially the same common filesystem(s). I THINK I
have the basic understanding behind that, but again, that's a different
topic, one I'll save for another thread when I get brave enough to try
pursuing it.

> > If not, how are they preserved? I don't ask about passwords only
> > because those probably should be changed on a reinstall anyway, but I
> > could see that being a major issue if you had to restored, like,
> dozens,
> > hundreds... thousands of accounts... but anyway, and suggestions?
> 
> Don't store hundreds or thousands of accounts in a flat file.  If you do
> your *@&(8 E$@(* &R@&@**@*(()@ insane anyway.  You store them in a
> distributed and redundant directory service.  Be it LDAP, NIS,
> whatever.  Although NIS sucks and LDAP rulez!

Hrmm, different swear macro... *hehe!* But good point. I wasn't really
thinking about that when I brought it up. Of course, I would be thinking
LDAP WELL before that point, like, say, at 'dozens' (as in 'one dozen'),
but I'm still trying to sort out BASIC DNS, and my time ain't all that
plentiful. One day, one day... 

Anyway, it SOUNDS like all I'd need to do in the present situation is
save those files and copy the one or two lines for the accounts in
question back into the new /etc/passwd and /etc/shadow files after
rebuilding the system? Let me know if I'm missing something, but thanks
to both of you for the info and advice!

-- 
Andrew Thompson <tempes@ameritech.net>
The Imagerie