Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

root password

0 views
Skip to first unread message

Claire Gould

unread,
Apr 6, 2002, 4:06:20 PM4/6/02
to
I am writing a GUI to the IPChains and IPTables tools. I was hoping to
prompt the user for the root password rather than telling them to log in as
root (if they aren't already!).

Is this possible? If so, how would I be able to check the password?

Many thanks,
Claire


Morten Nilsen

unread,
Apr 6, 2002, 5:38:48 PM4/6/02
to

I don't have any experience with GUI programming for X, but my guess is
you make a GUI wrapper to su, and then show that wrapper whenever the
user isn't root.
thus producing this process tree;

[user] myfrontend
su
[root] myfrontend

If you get my idea...

basic conceptual code;

if(user!=root) {
wrap("su - -c myfrontend");
return 0;
}

frontend code here
return 0;

--
Morten Nilsen, aka Dr. P

We are the borg^]dbdbiMicrosoft.
Prepare to be assimilated^]dbiembraced and extended.
Resistance is futile^]dbdbdbiWe know you want it.
:wq

Tony Lawrence

unread,
Apr 7, 2002, 6:58:11 AM4/7/02
to


See "man consolehelper"


--
Tony Lawrence
SCO/Linux Support Tips, How-To's, Tests and more: http://pcunix.com

0 new messages