Prompt for root password

Peter petermatulis at
Fri Jan 6 08:23:05 PST 2006

--- JD Arnold <jdarnold at> 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?

Here is a start:

$ su root -c 'man su'


Find your next car at

More information about the freebsd-questions mailing list