Date: Fri, 25 Apr 1997 03:24:48 +1000 From: David Nugent <davidn@labs.usn.blaze.net.au> To: keith waters <keith4@ilink.nis.za> Cc: hackers@freebsd.org Subject: Re: MISSING master.passwd !!! Please Help!! Message-ID: <199704241724.DAA08053@labs.usn.blaze.net.au> In-Reply-To: Your message of "Sat, 24 Apr 1997 18:05:03 %2B0200." <199704241605.SAA25750@ilink.nis.za>
next in thread | previous in thread | raw e-mail | index | archive | help
> I have a rather immediate urgent problem...
>
> My master.passwd file is missing!
Ouch.
> I have passwd, spwd.db and pwd.db
>
> Has anybody out there ever reverse-generated the passwords?
If you disable NIS, then pw(8) will almost do it for you.
The command "pw usershow -a" dumps the entire userfile, but
leaves out the password. If you apply the following diff to
src/usr.sbin/pw/pw_user.c, you'll get there all the way:
Index: pw_user.c
===================================================================
RCS file: /home/cvs/freebsd/src/usr.sbin/pw/pw_user.c,v
retrieving revision 1.19
diff -u -r1.19 pw_user.c
--- pw_user.c 1997/03/24 15:09:41 1.19
+++ pw_user.c 1997/04/24 17:19:26
@@ -955,7 +955,7 @@
if (!pretty) {
char buf[_UC_MAXLINE];
- fmtpwent(buf, pwd);
+ fmtpwentry(buf, pwd, PWF_MASTER);
fputs(buf, stdout);
} else {
int j;
David Nugent - Unique Computing Pty Ltd - Melbourne, Australia
Voice +61-3-9791-9547 Data/BBS +61-3-9792-3507 3:632/348@fidonet
davidn@freebsd.org davidn@blaze.net.au http://www.blaze.net.au/~davidn/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704241724.DAA08053>
