From owner-freebsd-questions@FreeBSD.ORG Sat Jan 7 02:09:59 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 737AA16A41F for ; Sat, 7 Jan 2006 02:09:59 +0000 (GMT) (envelope-from msoulier@gmail.com) Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id C8D8A43D48 for ; Sat, 7 Jan 2006 02:09:58 +0000 (GMT) (envelope-from msoulier@gmail.com) Received: by nproxy.gmail.com with SMTP id l36so1402737nfa for ; Fri, 06 Jan 2006 18:09:57 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=WqMSYShiSemhukRjBagntIsgC0xikQ55TU+o9h5fwbGXCswBPR+9eIbUl9Zdm0ZQ9duj1FvwVuEaCGW4KAtOTjpPfOt4abYRf+YCSuaFF6OEz0JDUW7vtLDeZbjvC1xyIDVY4cywiqglZe7PI3MZyNRbeEuIhGUnairoraDdnHk= Received: by 10.48.203.19 with SMTP id a19mr337574nfg; Fri, 06 Jan 2006 06:56:32 -0800 (PST) Received: by 10.48.233.11 with HTTP; Fri, 6 Jan 2006 06:56:32 -0800 (PST) Message-ID: Date: Fri, 6 Jan 2006 09:56:32 -0500 From: "Michael P. Soulier" Sender: msoulier@gmail.com To: JD Arnold In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: Cc: freebsd-questions@freebsd.org Subject: Re: Prompt for root password 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: Sat, 07 Jan 2006 02:09:59 -0000 On 1/6/06, JD Arnold wrote: > I'm writing a program that needs to write a file and I'd like to have it > ask for the root password and run as root, like many of the system config > applications do. Do I have to write something special, or is there some > way to tell KDE (or GNOME) to prompt for the root password? Is this what > a "setuid" program is? If it's a graphical program, you can call the gksudo command from gnome. Or, if you look in its sourcecode, you can find out how it works and integrate the same into your program. Mike -- Michael P. Soulier "Any intelligent fool can make things bigger and more complex... It takes a touch of genius - and a lot of courage to move in the opposite direction." --Albert Einstein