Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
| 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. |
|
 |
10-21-2003, 09:29 AM
|
#1
|
|
LQ Newbie
Registered: Aug 2003
Posts: 3
Rep:
|
Getting a program to start with root privileges when a user logs in.
Hey everyone,
I'm trying to get a program to start, not during startup but once a user logs on. The program need to be run with root privileges. I've adding it to rc.local, or init.d but this starts the program during startup whereas I only want it to start after logging in.
I've also put the program in .bashrc or /etc/profile this does the job of loading the program during startup but it's not run by root.
Anybody got any advice.
Thanks.
|
|
|
|
10-21-2003, 10:39 AM
|
#2
|
|
Member
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slackware, LFS, Ubuntu, RedHat, Slamd64
Posts: 507
Rep:
|
As root, "chmod u+s filename".
But this will only work on binaries, not scripts.
Also be careful about this, you're allowing people to run the program with all the rights of root.
John
|
|
|
|
10-21-2003, 11:19 AM
|
#3
|
|
LQ Newbie
Registered: Aug 2003
Posts: 3
Original Poster
Rep:
|
Thanks for the help.
I will try it just now, but I just want to ask does this mean that the user will be able to close the program. Because one of the reasons I want to run the program as root is so that the user cannot close it.
Thanks again.
|
|
|
|
10-21-2003, 11:41 AM
|
#4
|
|
Member
Registered: Jun 2003
Location: Dublin, Ireland
Distribution: Slackware, LFS, Ubuntu, RedHat, Slamd64
Posts: 507
Rep:
|
Umm, no they'll be able to close it. That's a different problem then. If you don't get any more responses to this thread, try reposting but use a subject line like "how to make a program persistant".
Sorry, I'm stumped!
John
|
|
|
|
10-24-2003, 11:47 AM
|
#5
|
|
Moderator
Registered: May 2001
Posts: 24,970
|
As I said in another thread, you should be careful to offer setting binaries setuid root unless I. you know (sourcecode, docs or experience) that it is a safe practice and II. there is no workaround.
Joeking, maybe you should explain first what application you want to run setuid root. Maybe there's a workaround.
|
|
|
|
| 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 05:59 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
|
|