Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Sep 1999 13:22:13 -0400
From:      "Troy Settle" <st@i-plus.net>
To:        <up@3.am>, <freebsd-isp@FreeBSD.ORG>
Subject:   RE: changing server platforms
Message-ID:  <NDBBKPEMLJEBDEPFNHOHCEEGCAAA.st@i-plus.net>
In-Reply-To: <Pine.GSO.4.10.9909291006230.17159-100000@richard2.pil.net>

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

James,

I assume that /etc/shadow and /etc/passwd are identical, with the exception
of the passwords.  I also assume that solaris uses DES encryption for it's
passwords.  If this is the case, your solution is simple:

Install DES for FreeBSD, then write a perl script to dismantle /etc/shadow,
and re-write it in the same format you see in FreeBSD's /etc/master.passwd.
Once done, run pwd_mkdb, and yer all set.

Untested, but should get you started:

#!/usr/bin/perl
while(<>) {
	($login,$passwd,$uid,$gid,$gecos,$home,$shell) = split(/:/);
	$new_pwd = join(':',$login,$passwd,$uid,$gid,'',0,0,$gecos,$home,$shell);
	print $new_pwd;
}


Good luck,

-Troy


> -----Original Message-----
> From: owner-freebsd-isp@FreeBSD.ORG
> [mailto:owner-freebsd-isp@FreeBSD.ORG]On Behalf Of up@3.am
> Sent: Wednesday, September 29, 1999 10:21 AM
> To: freebsd-isp@FreeBSD.ORG
> Subject: changing server platforms
>
>
>
> I'm getting ready to change our main server (mail, user web, ftd,
> secondary   radius, etc) from Sparc Solaris 2.6 to FreeBSD 3.2-RELEASE
> soon.  My main concern is going to be getting > 1100 usernames and
> passwords moved over.
>
> I can see that just moving /etc/passwd and /etc/shadow over isn't going to
> work.  In fact, I can see that FBSD doesn't even have an /etc/shadow, but
> what I assume contains that data, /etc/pwd.db, which appears to be some
> sort of hashed file.
>
> So far, I can think of a few ways to do this, none of them ideal:
>
> 1: gather all the usernames and passwords from a customer database and
> write a script to add them all in.  Problem with this is that database
> isn't 100% up-to-date with the passwords.
>
> 2: run a crack program (any recommendations?) on a copy of the Solaris
> /etc/shadow file, then trim out the username/passwd pairs for same script.
>
> Or <dream> There's a well-known utility to translate Solaris /etc/passwd
> and /etc/shadow files into a working FreeBSD format </dream>.
>
> Suggestions appreciated...
>
> James Smallacombe		      PlantageNet, Inc. CEO and Janitor
> up@3.am
http://3.am
=========================================================================
ISPF 3 - The Forum for ISPs by ISPs(tm)  ||  Nov 15-17, 1999, New Orleans
3 days of clues, news, and views from the industry's best and brightest.
     Visit <http://www.ispf.com/>; for information and registration.
=========================================================================



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



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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NDBBKPEMLJEBDEPFNHOHCEEGCAAA.st>