From owner-freebsd-questions@FreeBSD.ORG Tue Aug 12 18:10:30 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF6B5106567E for ; Tue, 12 Aug 2008 18:10:30 +0000 (UTC) (envelope-from freebsd@assetburned.de) Received: from mail-in-05.arcor-online.net (mail-in-05.arcor-online.net [151.189.21.45]) by mx1.freebsd.org (Postfix) with ESMTP id 2304E8FC0A for ; Tue, 12 Aug 2008 18:10:29 +0000 (UTC) (envelope-from freebsd@assetburned.de) Received: from mail-in-07-z2.arcor-online.net (mail-in-07-z2.arcor-online.net [151.189.8.19]) by mail-in-05.arcor-online.net (Postfix) with ESMTP id 2486418351D for ; Tue, 12 Aug 2008 20:10:28 +0200 (CEST) Received: from mail-in-14.arcor-online.net (mail-in-14.arcor-online.net [151.189.21.54]) by mail-in-07-z2.arcor-online.net (Postfix) with ESMTP id 000752C6F76 for ; Tue, 12 Aug 2008 20:10:27 +0200 (CEST) Received: from Fleas-MacBook.home (host86-151-63-175.range86-151.btcentralplus.com [86.151.63.175]) (Authenticated sender: florian.hannemann@arcor.de) by mail-in-14.arcor-online.net (Postfix) with ESMTP id 6471D1878FD for ; Tue, 12 Aug 2008 20:10:27 +0200 (CEST) Message-Id: <35383B16-54C2-406E-AC0A-D9C1CD7A033F@assetburned.de> From: assetburned To: freebsd-questions@freebsd.org In-Reply-To: <991123400808112229q184bca5ao8403a24ff8a56df@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v926) Date: Tue, 12 Aug 2008 19:10:26 +0100 References: <36770826-27C1-4806-8355-D07758613B39@assetburned.de> <991123400808112229q184bca5ao8403a24ff8a56df@mail.gmail.com> X-Mailer: Apple Mail (2.926) X-Virus-Scanned: ClamAV 0.93.3/8018/Tue Aug 12 10:36:31 2008 on mail-in-14.arcor-online.net X-Virus-Status: Clean Subject: Re: how to let MPD check the password against POP3, IMAP or WWW? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Aug 2008 18:10:30 -0000 Hi that is not exactly what I wanted to do. My idea was to use a script which accepts the username and password as parameters and then tryes to connect to a web, pop3 or imap server, depending on what is easier. e.g. lynx -auth=username:password http://some.foobar.org/protected and only if the script is able to fetch the protected page, than the user is also accepted for the VPN connection. CU AssetBurned On 12.08.2008, at 06:29, Odhiambo Washington wrote: > On Sun, Aug 10, 2008 at 6:20 PM, assetburned > wrote: >> I have a MPD VPN server and another machine which runs WWW, IMAP >> and POP3 >> services. >> >> I know that I could check if a password is valid e.g. by writing a >> script >> which calls a Lynx command. >> >> But how can I forward the password from MPD to that script? And I >> also think >> that the password has to be unencrypted for the lynx command, so >> how can I >> manage that? >> > I run dovecot with MySQL database on one of my servers. Dovecot > provides POP3/IMAP. > I also have mpd5 on this box and I use credentials from the DB (which > contains cleartext passwords) for mpd5 to authenticate, but I do it > using a script which extracts the username and cleartext password and > writes those to mpd.secret, and also sets the correct permissions on > the file. It's a simplistic shell script, called from cron once a day.