Blocking a command from execution in ubuntuBlock a command from sudo userWhat is “chmod” and its practical aspects?Having trouble with chmodRepair filesystem permissionchmod: Everything on SD Card Stuck On 755, Owner is RootHow to fix corrupted permissions inside encfs encrypted folderPermission denied for 'sudo' after 'sudo chmod 666 /usr'Chown and chmod in ubuntu with different applications using common files
How does a variable caster level work for spells?
Will being an emotionally numb 14 year-old prevent me from eventually being a pilot?
Is a vector space naturally isomorphic to its dual?
What were the prevailing real-life cultural connotations of "clones" in 1975 (Star Wars' 3rd draft)?
Vintage vs modern B&W photography techniques differ in color luminance - what's going on here?
Is a pad just a melody synth with a bunch of reverb and echo?
LWC not evaluating the if:true statement
Why are observers/reference frames able to see themselves moving through time but not through space?
A professor commented that my research is too simple as compared to my colleagues. What does that mean about my future prospects?
if chords are not only linked to the major scale, then why scales at all?
Why do we worry about overfitting even if "all models are wrong"?
Why does the single dot entry exist in file systems?
How tall would a rainforest need to be to make it completely dark at ground level
Why use a recurrent neural network over a feedforward neural network for sequence prediction?
FIDE Laws of Chess pre-2017
Why is Carbon Dioxide a Greenhouse Gas whereas Ammonia is not?
1 kHz clock over long wire
Is this a deadly encounter?
What is the process of going from machine code to electrically controlling individual transistors?
Why is the Duration of Time spent in the Dayside greater than that of the Night side of the Moon for Chandrayaan-2 Orbiter?
JPEG with transparent background
Can dual US-Canadian citizens travel to the US with an expired US passport but valid Canadian passport?
What are the catcode 11 / letter codepoints in Xe(La)Tex?
How to specify index of specific elements in every sublist of nested list?
Blocking a command from execution in ubuntu
Block a command from sudo userWhat is “chmod” and its practical aspects?Having trouble with chmodRepair filesystem permissionchmod: Everything on SD Card Stuck On 755, Owner is RootHow to fix corrupted permissions inside encfs encrypted folderPermission denied for 'sudo' after 'sudo chmod 666 /usr'Chown and chmod in ubuntu with different applications using common files
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I have a shared PC with Ubuntu in it, My friends may also want to use sudo.
But I know they often play with the command
chmod -R 777 /
I need to know is there a way to specifically block this command from execution even by the root user. As no one gonna has to use this command on the usual purpose.
But I may need friends to use chmod on other dirs.
gnome-terminal chmod
add a comment
|
I have a shared PC with Ubuntu in it, My friends may also want to use sudo.
But I know they often play with the command
chmod -R 777 /
I need to know is there a way to specifically block this command from execution even by the root user. As no one gonna has to use this command on the usual purpose.
But I may need friends to use chmod on other dirs.
gnome-terminal chmod
4
I simply wouldn't givesudoability to a "friend" who thinks it's fun to wreck my computer. Welcome to Ask Ubuntu.
– chili555
Jul 14 at 2:26
Would it be possible for your friends to experiment with commands in virtual machines running on the shared PC?
– dsstorefile1
Jul 14 at 7:38
See Block a command from sudo user but note that it's non-trivial to make such measures effective - most obviously, if you don't prevent "other" sudoers from editing the sudoers file
– steeldriver
Jul 14 at 16:49
add a comment
|
I have a shared PC with Ubuntu in it, My friends may also want to use sudo.
But I know they often play with the command
chmod -R 777 /
I need to know is there a way to specifically block this command from execution even by the root user. As no one gonna has to use this command on the usual purpose.
But I may need friends to use chmod on other dirs.
gnome-terminal chmod
I have a shared PC with Ubuntu in it, My friends may also want to use sudo.
But I know they often play with the command
chmod -R 777 /
I need to know is there a way to specifically block this command from execution even by the root user. As no one gonna has to use this command on the usual purpose.
But I may need friends to use chmod on other dirs.
gnome-terminal chmod
gnome-terminal chmod
edited Jul 14 at 2:18
Sivaramakrishnan
asked Jul 14 at 2:13
SivaramakrishnanSivaramakrishnan
32 bronze badges
32 bronze badges
4
I simply wouldn't givesudoability to a "friend" who thinks it's fun to wreck my computer. Welcome to Ask Ubuntu.
– chili555
Jul 14 at 2:26
Would it be possible for your friends to experiment with commands in virtual machines running on the shared PC?
– dsstorefile1
Jul 14 at 7:38
See Block a command from sudo user but note that it's non-trivial to make such measures effective - most obviously, if you don't prevent "other" sudoers from editing the sudoers file
– steeldriver
Jul 14 at 16:49
add a comment
|
4
I simply wouldn't givesudoability to a "friend" who thinks it's fun to wreck my computer. Welcome to Ask Ubuntu.
– chili555
Jul 14 at 2:26
Would it be possible for your friends to experiment with commands in virtual machines running on the shared PC?
– dsstorefile1
Jul 14 at 7:38
See Block a command from sudo user but note that it's non-trivial to make such measures effective - most obviously, if you don't prevent "other" sudoers from editing the sudoers file
– steeldriver
Jul 14 at 16:49
4
4
I simply wouldn't give
sudo ability to a "friend" who thinks it's fun to wreck my computer. Welcome to Ask Ubuntu.– chili555
Jul 14 at 2:26
I simply wouldn't give
sudo ability to a "friend" who thinks it's fun to wreck my computer. Welcome to Ask Ubuntu.– chili555
Jul 14 at 2:26
Would it be possible for your friends to experiment with commands in virtual machines running on the shared PC?
– dsstorefile1
Jul 14 at 7:38
Would it be possible for your friends to experiment with commands in virtual machines running on the shared PC?
– dsstorefile1
Jul 14 at 7:38
See Block a command from sudo user but note that it's non-trivial to make such measures effective - most obviously, if you don't prevent "other" sudoers from editing the sudoers file
– steeldriver
Jul 14 at 16:49
See Block a command from sudo user but note that it's non-trivial to make such measures effective - most obviously, if you don't prevent "other" sudoers from editing the sudoers file
– steeldriver
Jul 14 at 16:49
add a comment
|
1 Answer
1
active
oldest
votes
The answer is don't give sudo or root permissions to anybody you don't trust with them. If it's your computer and they might wreck your machine, then don't give them any elevated permissions, or don't let them use the computer at all.
If It is not possible to restrict, is there any way to easily recover such thing after the execution of that command?
– Sivaramakrishnan
Jul 17 at 5:21
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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/4.0/"u003ecc by-sa 4.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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1158134%2fblocking-a-command-from-execution-in-ubuntu%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The answer is don't give sudo or root permissions to anybody you don't trust with them. If it's your computer and they might wreck your machine, then don't give them any elevated permissions, or don't let them use the computer at all.
If It is not possible to restrict, is there any way to easily recover such thing after the execution of that command?
– Sivaramakrishnan
Jul 17 at 5:21
add a comment
|
The answer is don't give sudo or root permissions to anybody you don't trust with them. If it's your computer and they might wreck your machine, then don't give them any elevated permissions, or don't let them use the computer at all.
If It is not possible to restrict, is there any way to easily recover such thing after the execution of that command?
– Sivaramakrishnan
Jul 17 at 5:21
add a comment
|
The answer is don't give sudo or root permissions to anybody you don't trust with them. If it's your computer and they might wreck your machine, then don't give them any elevated permissions, or don't let them use the computer at all.
The answer is don't give sudo or root permissions to anybody you don't trust with them. If it's your computer and they might wreck your machine, then don't give them any elevated permissions, or don't let them use the computer at all.
answered Jul 14 at 4:03
GerowenGerowen
1,2377 silver badges16 bronze badges
1,2377 silver badges16 bronze badges
If It is not possible to restrict, is there any way to easily recover such thing after the execution of that command?
– Sivaramakrishnan
Jul 17 at 5:21
add a comment
|
If It is not possible to restrict, is there any way to easily recover such thing after the execution of that command?
– Sivaramakrishnan
Jul 17 at 5:21
If It is not possible to restrict, is there any way to easily recover such thing after the execution of that command?
– Sivaramakrishnan
Jul 17 at 5:21
If It is not possible to restrict, is there any way to easily recover such thing after the execution of that command?
– Sivaramakrishnan
Jul 17 at 5:21
add a comment
|
Thanks for contributing an answer to Ask Ubuntu!
- 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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1158134%2fblocking-a-command-from-execution-in-ubuntu%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
4
I simply wouldn't give
sudoability to a "friend" who thinks it's fun to wreck my computer. Welcome to Ask Ubuntu.– chili555
Jul 14 at 2:26
Would it be possible for your friends to experiment with commands in virtual machines running on the shared PC?
– dsstorefile1
Jul 14 at 7:38
See Block a command from sudo user but note that it's non-trivial to make such measures effective - most obviously, if you don't prevent "other" sudoers from editing the sudoers file
– steeldriver
Jul 14 at 16:49