Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
03-15-2005, 06:49 AM
|
#1
|
|
Member
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320
Rep:
|
run program as root / password prompt
dear all,
i have developed a small application that needs to be run as root.
now, if i set the 'execute' permissions to this file to root, if i run it as normal user i get an error, of course, since i do not have the permissions to do so.
what i'd like to do is that a box appears to enter the root password, so that then it's the root which is running the program. this is done in many apps such as package installers, updaters, desktop preferences setups, etc.
anyone knows how can i do this also for my tiny app?
thanks,
aj.
EDIT: i've seen that the files such as some package managers point to /usr/bin/consolehelper as link, but this starts console. or maybe SUDO? anyone?
Last edited by acidjuice; 03-15-2005 at 07:11 AM.
|
|
|
|
03-15-2005, 08:00 AM
|
#2
|
|
LQ Newbie
Registered: Oct 2003
Location: Wolverhampton
Distribution: Suse
Posts: 26
Rep:
|
you can use sudo. If you specify PASSWD in /etc/sudoers then the user will be prompted for the root password.
an entry in the /etc/sudoers such as:
%groupname ALL=PASSWD:ALL
should do it simply
regards
|
|
|
|
03-15-2005, 08:08 AM
|
#3
|
|
Member
Registered: Jan 2005
Location: a tiny spot on the iceberg
Distribution: Slackware 10.1 (dropline 2.10, kernel 2.6.11.6)
Posts: 320
Original Poster
Rep:
|
thank you p8080,
however i was looking for something a little more complex.
found this which is exactly what i was looking for, i guess this might be of some use to other forum members.
thank you,
aj.
|
|
|
|
03-15-2005, 08:18 AM
|
#4
|
|
Member
Registered: Apr 2003
Location: Bangalore,India
Distribution: FC2, RHES, RH9, FC3, FC1, Slackware 3.0
Posts: 208
Rep:
|
kdesu -u root -c command ?
|
|
|
|
03-15-2005, 01:16 PM
|
#5
|
|
Senior Member
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524
Rep:
|
`gksu ~/hanoi.sh', for those who don't use KDE.
|
|
|
|
03-15-2005, 01:51 PM
|
#6
|
|
LQ Newbie
Registered: Sep 2004
Location: Berlin - Germany
Posts: 4
Rep:
|
Quote:
Originally posted by zeropash
kdesu -u root -c command ?
|
what's kdesu? something like su for X?
i would use:
su - root -c <path>/<to>/<program>
or executing the prog with sudoers.
you can configure it so, that you can execute this certain prog as a certain user even without havong to give a password.
|
|
|
|
03-15-2005, 10:33 PM
|
#7
|
|
Member
Registered: Apr 2003
Location: Bangalore,India
Distribution: FC2, RHES, RH9, FC3, FC1, Slackware 3.0
Posts: 208
Rep:
|
kdesu comes with kde packge. it will ask for the password and after auth will run the program
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:12 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|