Need to run scripts/commands with root privileges for user selfservicesGaining root privileges in SCOStart...

Is there any official ruling on how characters go from 0th to 1st level in a class?

How to train a replacement without them knowing?

The space of cusp forms for GL_2 over F_q(T)

Do I need to start off my book by describing the character's "normal world"?

Is the Microsoft recommendation to use C# properties applicable to game development?

Why do we use low resistance cables to minimize power losses?

Is there a fallacy about "appeal to 'big words'"?

How do ultra-stable oscillators for spacecraft work?

What does 〇〇〇〇 mean when combined with おじさん?

What's the point of writing that I know will never be used or read?

When did Bilbo and Frodo learn that Gandalf was a Maia?

How does the Moon's gravity affect Earth's oceans despite Earth's stronger gravitational pull?

100 Years of GCHQ - A quick afternoon puzzle!

What are these panels underneath the wing root of a A380?

Is nullptr falsy?

Why don't modern jet engines use forced exhaust mixing?

Upside down reversion for a Greek letter

Why should I pay for an SSL certificate?

Adding things to bunches of things vs multiplication

How to gracefully leave a company you helped start?

How do I answer an interview question about how to handle a hard deadline I won't be able to meet?

What exactly happened to the 18 crew members who were reported as "missing" in "Q Who"?

global variant of csname…endcsname

Scam? Phone call from "Department of Social Security" asking me to call back



Need to run scripts/commands with root privileges for user selfservices


Gaining root privileges in SCOStart Vim as my user with root privilegesHow do I get simple scripts which seem to need root priveliges to run via the www-data user?How do I drop root privileges in shell scripts?Unable to get rid of root user and privilegesNginx Static Build - Run as root with a non-root userHow to `exec` process with custom env?Is it possible to retain the union of user privileges and root privileges when using sudo?Acecssing NFS share without root privilegesWhy different command scripts are used for the same command when run as a normal user and when run as a root user?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1















The core of the topic is a very a common but I am not satisfied.



I have a script looking for a pid and running the kill command on the pid if found.



So I chown the script to root.root and add 4755 as suid.



The script should now run with root privileges, right? Nope.



I stumbled over a nice explanatory article explaining why it ain't working due to security reasons See Vidar's Blog here



Is there a way to achieve the a code like



kill -9 3385


in the context of root?



Could an approach be to invoke a child script that has the required privileges?










share|improve this question









New contributor



Jan S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






















  • You can make /bin/kill setuid root and then your system is no longer the same ;-D (protip: don't do it :)

    – Jonas Berlin
    yesterday













  • Anyway I recommend giving sudo right to selected accounts to run the script with root privileges.

    – Jonas Berlin
    yesterday











  • Looks like there is no way around. Cheers mate :)

    – Jan S
    yesterday




















1















The core of the topic is a very a common but I am not satisfied.



I have a script looking for a pid and running the kill command on the pid if found.



So I chown the script to root.root and add 4755 as suid.



The script should now run with root privileges, right? Nope.



I stumbled over a nice explanatory article explaining why it ain't working due to security reasons See Vidar's Blog here



Is there a way to achieve the a code like



kill -9 3385


in the context of root?



Could an approach be to invoke a child script that has the required privileges?










share|improve this question









New contributor



Jan S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






















  • You can make /bin/kill setuid root and then your system is no longer the same ;-D (protip: don't do it :)

    – Jonas Berlin
    yesterday













  • Anyway I recommend giving sudo right to selected accounts to run the script with root privileges.

    – Jonas Berlin
    yesterday











  • Looks like there is no way around. Cheers mate :)

    – Jan S
    yesterday
















1












1








1








The core of the topic is a very a common but I am not satisfied.



I have a script looking for a pid and running the kill command on the pid if found.



So I chown the script to root.root and add 4755 as suid.



The script should now run with root privileges, right? Nope.



I stumbled over a nice explanatory article explaining why it ain't working due to security reasons See Vidar's Blog here



Is there a way to achieve the a code like



kill -9 3385


in the context of root?



Could an approach be to invoke a child script that has the required privileges?










share|improve this question









New contributor



Jan S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











The core of the topic is a very a common but I am not satisfied.



I have a script looking for a pid and running the kill command on the pid if found.



So I chown the script to root.root and add 4755 as suid.



The script should now run with root privileges, right? Nope.



I stumbled over a nice explanatory article explaining why it ain't working due to security reasons See Vidar's Blog here



Is there a way to achieve the a code like



kill -9 3385


in the context of root?



Could an approach be to invoke a child script that has the required privileges?







linux bash root suid






share|improve this question









New contributor



Jan S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



Jan S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited yesterday









Jeff Schaller

49k11 gold badges72 silver badges162 bronze badges




49k11 gold badges72 silver badges162 bronze badges






New contributor



Jan S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked yesterday









Jan SJan S

112 bronze badges




112 bronze badges




New contributor



Jan S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




Jan S is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















  • You can make /bin/kill setuid root and then your system is no longer the same ;-D (protip: don't do it :)

    – Jonas Berlin
    yesterday













  • Anyway I recommend giving sudo right to selected accounts to run the script with root privileges.

    – Jonas Berlin
    yesterday











  • Looks like there is no way around. Cheers mate :)

    – Jan S
    yesterday





















  • You can make /bin/kill setuid root and then your system is no longer the same ;-D (protip: don't do it :)

    – Jonas Berlin
    yesterday













  • Anyway I recommend giving sudo right to selected accounts to run the script with root privileges.

    – Jonas Berlin
    yesterday











  • Looks like there is no way around. Cheers mate :)

    – Jan S
    yesterday



















You can make /bin/kill setuid root and then your system is no longer the same ;-D (protip: don't do it :)

– Jonas Berlin
yesterday







You can make /bin/kill setuid root and then your system is no longer the same ;-D (protip: don't do it :)

– Jonas Berlin
yesterday















Anyway I recommend giving sudo right to selected accounts to run the script with root privileges.

– Jonas Berlin
yesterday





Anyway I recommend giving sudo right to selected accounts to run the script with root privileges.

– Jonas Berlin
yesterday













Looks like there is no way around. Cheers mate :)

– Jan S
yesterday







Looks like there is no way around. Cheers mate :)

– Jan S
yesterday












0






active

oldest

votes














Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Jan S is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f535719%2fneed-to-run-scripts-commands-with-root-privileges-for-user-selfservices%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








Jan S is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Jan S is a new contributor. Be nice, and check out our Code of Conduct.













Jan S is a new contributor. Be nice, and check out our Code of Conduct.












Jan S is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f535719%2fneed-to-run-scripts-commands-with-root-privileges-for-user-selfservices%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...