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

Re: Simple way to save login/password info

Well, you could
  scp /etc/passwd /etc/shadow backupmachine:/backupdir/

That's probably the easiest way. :)  I suppose you could do some
  "awk -F: '$3>1000' > backup"
  "for D in /home/*; do grep $D /etc/passwd; done > backup"
kind of thing to get just the non-system accounts.

You should be able to get all the information for accounts on a system
regardless of their database by using the getpw*/getgr* family of
functions (perl, C, whatever language) as root (and restore with
setpw*), too.  But at that point of effort, you'd be better served by
putting everyone in an LDAP backend and just dumping that set of users
to an LDIF periodically.  You could stab your mail server configuration
and stuff in there at the same time, and kill two backup birds with one
lightweight stone, and be better prepared for replication in the future.

--Danny, probably missing some critical piece of information there

Erich wrote regarding 'Simple way to save login/password info' on Mon, May 07 at 11:46:
> What would be a simple way to save a bunch of username/password pairs from 
> an email server? In the case of a catastrophic problem on a stock fedora 
> server, it would be nice to be able to recreate the user accounts (mostly 
> without shell access) easily on a new machine. Backing up data associated 
> with the user accounts is easy, but I don't currently have the option of 
> full-system reduncancy.
> I've looked through the "shadow-utils" stuff, and the pwconv/pwunconv 
> commands almost look what what I want, but unless I'm missing something 
> they really make changes on the actual, live, files. I'm more interested 
> in a complete copy that I can keep securely someplace remote from the 
> server.

To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.