Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Aug 1998 15:53:05 +0200 (CEST)
From:      Malte Lance <malte.lance@gmx.net>
To:        Jeffrey Dunitz <orpheus@cray.com>
Cc:        Lee Reese <lee@gwinnett.com>, freebsd-questions@FreeBSD.ORG, freebsd-isp@FreeBSD.ORG
Subject:   Re: Web Server Linux to FreeBSD
Message-ID:  <13787.62792.159201.16202@neuron.webmore.de>
In-Reply-To: <Pine.SGI.3.96.980819163833.25996O-100000@sooner>
References:  <35DB258C.41C67EA6@gwinnett.com> <Pine.SGI.3.96.980819163833.25996O-100000@sooner>

next in thread | previous in thread | raw e-mail | index | archive | help
Jeffrey Dunitz writes:
 > On Wed, 19 Aug 1998, Lee Reese wrote:
 > 
 > >Date: Wed, 19 Aug 1998 15:20:44 -0400
 > >From: Lee Reese <lee@gwinnett.com>
 > >To: freebsd-questions@FreeBSD.ORG
 > >Cc: freebsd-isp@FreeBSD.ORG
 > >Subject: Web Server Linux to FreeBSD
 > >
 > >Hi.  I'm in the process of converting our web server from Slackware
 > >Linux to FreeBSD (Apache).  We need a down and dirty way to transfer the
 > >/etc/passwd file to a format the FreeBSD understands.  Please resopnd
 > >via e-mail.  Thanks.
 > 
 > 
 > I wish I could go into lots of detail here, but I can't. 
 >  
 > The difference between a linux password file and a freebsd one is that
 > all the same information is there, but one has more fields than the
 > other does. 
 > 
 > I've converted password files between various unices using sed and awk
 > scripts. Here's the quickest, vaguest sed/awk lesson you'll ever get:
 > 
 > orpheus:vi3g/BUV6Y05.:500:100:Jeffrey Dunitz:/home/orpheus:/bin/bash
 > orpheus:mz/.Rcl79oNnS:500:100::0:0:Jeffrey Dunitz:/home/orpheus:/bin/bash
 > 
 > So there's two example password entries, one from a standard unix password
 > file and one from a FreeBSD master.passwd. Note that freebsd has some 
 > extra :0:0: stuff.
 > Also notice that the fields are separated by : characters.
 > 
 > Also note bigtime that those encrypted passwords are made up and just look
 > like actual passwords. I'm not stupid enough to mail out my actual password
 > file entries so that you all can try to crack them. :)
 > Anyway...

There is more than this. There is an essential difference
between DES-encryption and MD5-encryption of passwords. Both
is possible with FreeBSD. I don't know about Linux.
So far there is no easy way to convert between DES- and
MD5-encryption.

BTW, Jeffrey, what version of FreeBSD are you running ?

Malte.

 > 
 > 
 > You can use awk  to spit out fields and arbitrary data:
 > cat /etc/passwd | awk -F: '{print $1":"$2}'
 > just prints the first two fields with the colon. You have to quote the 
 > colon like that, or it won't work right.
 > You can then figure out how to add in the extra ":0:0" stuff on your own.
 > Should be easy.
 > 
 > 
 > Note that there are some religious fanatics who would insist that the only
 > way to do this right is to use Perl. Other crazies will tell you that you
 > must use sed. I know how to do it with awk, and it took me about 45 seconds
 > to actually figure out how to do it. It would take me another 45 to actually
 > generate a working password file with the extra stuff in there. I don't know
 > if I could figure out how to make perl do that same thing. I'm not a perl
 > god. Your mileage may vary.
 > 
 > >
 > >Lee
 > >
 > >To Unsubscribe: send mail to majordomo@FreeBSD.org
 > >with "unsubscribe freebsd-questions" in the body of the message
 > >
 > 
 > 
 > - -- -- --- --- --- ---- ---- ----- ----- ----- ----- ------| -------------- 
 > Jeffrey Dunitz (orpheus@cray.com)              612-683-7266 | it's hard times
 > Information Services    <http://wwwis.cray.com/~orpheus>;    | befallen the
 > ===== Cray Research, now Silicon Graphics = == === === =====| sole survivors.
 > 
 > 
 > 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?13787.62792.159201.16202>