From owner-freebsd-questions Thu May 9 18:02:42 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id SAA21178 for questions-outgoing; Thu, 9 May 1996 18:02:42 -0700 (PDT) Received: from relay-4.mail.demon.net (relay-4.mail.demon.net [158.152.1.108]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id SAA21148 for ; Thu, 9 May 1996 18:02:36 -0700 (PDT) Received: from post.demon.co.uk ([158.152.1.72]) by relay-4.mail.demon.net id ad18612; 10 May 96 1:02 GMT Received: from jraynard.demon.co.uk ([158.152.42.77]) by relay-3.mail.demon.net id aa13048; 10 May 96 1:18 +0100 Received: (from fqueries@localhost) by jraynard.demon.co.uk (8.6.12/8.6.12) id UAA11147; Thu, 9 May 1996 20:33:21 GMT Date: Thu, 9 May 1996 20:33:21 GMT From: James Raynard Message-Id: <199605092033.UAA11147@jraynard.demon.co.uk> To: paul@nation-net.com CC: questions@freebsd.org In-reply-to: <31920D43.51C5@nation-net.com> (message from Paul Walsh on Thu, 09 May 1996 16:20:35 +0100) Subject: Re: Help generating passwords for Apache users Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >>>>> Paul Walsh writes: > > Is there a utility in FreeBSD to generate encrypted passwords ( for use > in an Apache users file ) > or do I have to write a script myself using crypt() !? > > Can I use adduser and then cut/paste from the passwd file? You'd have to use vipw to view the encrypted password, as the passwd file is shadowed and has a '*' where the password would be. And you have to be root to run vipw. It may well be more practical to write a short Perl script using the crypt() function - this is how adduser uses it:- $cryptpwd = crypt($password, &salt) if $password ne "";