Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Nov 1999 10:18:16 +0100 (CET)
From:      Christian Kratzer <ck@toplink.net>
To:        TrouBle <trouble@hackfurby.com>
Cc:        "freebsd-questions@freebsd.org" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: REWARD...! Perl Programmer master.passwd problem
Message-ID:  <Pine.BSF.4.10.9911011011250.38618-100000@babylon.toplink.net>
In-Reply-To: <381CD49F.7243D959@hackfurby.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Sun, 31 Oct 1999, TrouBle wrote:

> Okay real simple.... ive had enough, i have a cash reward of a decent
> sum to the first perl programmer who can re-write a script, to work with
> the BSd style master.passwd file and write it cortrectly, this is a web
> based cgi written in perl, orginially for linux shadow passwds. i can
> give you access to the box, the script and the first person who can
> provide a working solution gets the dough... oh... yeah the dough, well
> its a few hundred dollars offered by my employer. let me know who wants
> a crack at it !

no big deal. We have awk or perl scripts creating master.passwd files
on freebsd since we started with FreeBSD 2.0.   We learned by reading
the vipw source code.

You need to do following

1.	write master.passwd.tmp or other name somewhere in same file
	system as /etc lives in.  Best is /etc/master.passwd.tmp

2.	run pwd_mkdb -p /etc/master.passwd.tmp

	This installs the new master.passwd and creates/updates following files
	- passwd 	plaintext stripped version of master.passwd in classic
			unix format without crypted passwords
	- spwd.db	Binary version of master.passwd  
	- pwd.db	Binary version of passwd  

	All the information for the other files is in master.passwd

Thats it.  But beware. You can screw up things really bad.
Be sure to have a root window open when you debug your script.
Backups of master.passwd are made on a daily basis to /var/backup in case
you forgot to backup your script.

With above information you should be able to port your linux scripts just
fine yourself and cash your bosses reward ;-)

Greetings
Christian

-- 
TopLink Internet Services GmbH			ck@171.2.195.in-addr.arpa
Christian Kratzer				http://www.toplink.net/
Phone: 	+49 7032 2701-0
Fax: 	+49 7032 2701-19	FreeBSD spoken here!



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9911011011250.38618-100000>