Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Mar 2001 21:17:09 -0800
From:      "Ted Mittelstaedt" <tedm@toybox.placo.com>
To:        "Scott Pilz" <tech@squid.tznet.com>, <freebsd-questions@FreeBSD.ORG>
Subject:   RE: SUN TO BSD
Message-ID:  <000401c0a5fc$b17ee940$1401a8c0@tedm.placo.com>
In-Reply-To: <Pine.BSF.4.05.10103051451510.94005-100000@squid.tznet.com>

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


Ted Mittelstaedt                      tedm@toybox.placo.com
Author of:          The FreeBSD Corporate Networker's Guide
Book website:         http://www.freebsd-corp-net-guide.com


>-----Original Message-----
>From: owner-freebsd-questions@FreeBSD.ORG
>[mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Scott Pilz
>Sent: Monday, March 05, 2001 12:54 PM
>To: freebsd-questions@FreeBSD.ORG
>Subject: SUN TO BSD
>
>
>Does anyone know of a program, utility, or someone that knows code well
>enough, to convert the SUNOS (5.7) password files to FreeBSD 4.0 password
>files?
>

Why, certainly.  Part of this is in the passwd manual page in
section 5.  I also discuss this in my book in Chapter 4 under
Migrating Passwords.  That section follows here:

-----snip---------
In order to migrate the Solaris password file to the FreeBSD system, the
first step is recombining the two passwd and shadow files.  One of the
simplest ways to do this is to FTP these files to a PC in ASCII mode and
import both files into a spreadsheet like Microsoft Excel.  Before doing
this, go through the password file on the FreeBSD system and remove any
commas in the username description area.  During the File Open and Import
wizard, select the colon ":" as the delimiter.  Once both spreadsheet files
are open, copy and paste column B of the shadow file into column B of the
passwd file.  Make absolutely sure that the length of the column is the same
and that each username corresponds with it’s password.  Then save the file
as a comma-delimited file, and FTP in ASCII mode back to the Unix system.

The next thing needed is to replace all of the commas with colons, and add
the additional colon fields that are present in FreeBSD.  This can be done
with the following command:

awk -F, '{print $1":"$2":"$3":"$4"::0:0:"$5":"$6":"$7}' <passwd.csv>master

When this is completed open up the master file and verify that it’s lines
looks like the following:

.
.
hmfolk:PcjTEFdWeAxr6:513:60001::0:0:The Realtor:/home/hmfolk:/bin/sh
sjccstw:MCJBR96eZWsHM:519:60001::0:0:SJCC:/home/sjccstw:/bin/sh
.
.

Make sure to go through the entire password file and correct any syntax
errors.

When the password file has been verified to be correct in the editor, run
the vipw command and Read ( with vi, do a :r filename) in the new password
file.  Delete any redundant usernames, and write it out and exit vipw.  The
FreeBSD hashed password files will be properly rebuilt.
----------snip-------------

>Can this, has this, would this ever, be able to be done?
>
>We have a Sun box that has 10k users, it sucks.
>
>We want to switch from Sun and go to BSD all the way.
>
>Is this even possible? I don't want to type in 10,000 user's names and
>passwords by hand.
>
>
>To Unsubscribe: send mail to majordomo@FreeBSD.org
>with "unsubscribe freebsd-questions" in the body of the message
>


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?000401c0a5fc$b17ee940$1401a8c0>