ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
You can make a daemon that runs under root previlege and waits for a connection from localhost , then run the raw command
this by itself is a security hole
you can sit behind xinetd , most of daemons do like this
see man pages for inetd and xinetd
but still I'm not sure about security
I will search for this and will let you know if I find any solution , but keep searching
Thank you Arsham.
I think I can make it a daemon and wait for connection to run sepecific commands but password is required. And the web UI must also need username and password to access it. I may try to secure them by SSL.
But I feel this solution is unsafe. So if there is better solution, please tell me soon.
Kernel doesn't let you to post the root password , I mean you have to sit in front of the computer or ssh/telnet it and open a shell to login as root
you must limit the access of the daemon to localhost , for reson of security
Perhaps this would work... Write a script/program to run the command for you, set the owner to root and as root run chmod 4755 on it. This makes it run as the user who created it, i.e. root.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.