How to know what program needs which group to be executed without sudo
In particular I want to create bridges dynamically, but without the need of running it with sudo
. I think it's the group netdev
.
But is there, and I'm sure there is, a general answer to the question: How can I determine the group needed to run a program without typing sudo
in front of the command
permissions groups installed-programs
add a comment |
In particular I want to create bridges dynamically, but without the need of running it with sudo
. I think it's the group netdev
.
But is there, and I'm sure there is, a general answer to the question: How can I determine the group needed to run a program without typing sudo
in front of the command
permissions groups installed-programs
This lloks like two questions. Run command withoutsudo
(use /etc/sudoers.d) for groupnetdev
and find which group (top) a command runs under! Which should it be?
– George Udosen
Dec 13 '18 at 14:44
2
I'm not sure that's really the right question: in the example you give, AFAIK it's not about permissions required to run the program, it's about the permissions required for the program to modify a device file
– steeldriver
Dec 13 '18 at 14:47
I think he means how do you know which group you should add to user so the user don't have to use sudo.
– Alvin Liang
Dec 13 '18 at 14:51
@AlvinLiang yes that's what I mean.
– Kev Inski
Dec 13 '18 at 18:11
add a comment |
In particular I want to create bridges dynamically, but without the need of running it with sudo
. I think it's the group netdev
.
But is there, and I'm sure there is, a general answer to the question: How can I determine the group needed to run a program without typing sudo
in front of the command
permissions groups installed-programs
In particular I want to create bridges dynamically, but without the need of running it with sudo
. I think it's the group netdev
.
But is there, and I'm sure there is, a general answer to the question: How can I determine the group needed to run a program without typing sudo
in front of the command
permissions groups installed-programs
permissions groups installed-programs
asked Dec 13 '18 at 14:25
Kev InskiKev Inski
743411
743411
This lloks like two questions. Run command withoutsudo
(use /etc/sudoers.d) for groupnetdev
and find which group (top) a command runs under! Which should it be?
– George Udosen
Dec 13 '18 at 14:44
2
I'm not sure that's really the right question: in the example you give, AFAIK it's not about permissions required to run the program, it's about the permissions required for the program to modify a device file
– steeldriver
Dec 13 '18 at 14:47
I think he means how do you know which group you should add to user so the user don't have to use sudo.
– Alvin Liang
Dec 13 '18 at 14:51
@AlvinLiang yes that's what I mean.
– Kev Inski
Dec 13 '18 at 18:11
add a comment |
This lloks like two questions. Run command withoutsudo
(use /etc/sudoers.d) for groupnetdev
and find which group (top) a command runs under! Which should it be?
– George Udosen
Dec 13 '18 at 14:44
2
I'm not sure that's really the right question: in the example you give, AFAIK it's not about permissions required to run the program, it's about the permissions required for the program to modify a device file
– steeldriver
Dec 13 '18 at 14:47
I think he means how do you know which group you should add to user so the user don't have to use sudo.
– Alvin Liang
Dec 13 '18 at 14:51
@AlvinLiang yes that's what I mean.
– Kev Inski
Dec 13 '18 at 18:11
This lloks like two questions. Run command without
sudo
(use /etc/sudoers.d) for group netdev
and find which group (top) a command runs under! Which should it be?– George Udosen
Dec 13 '18 at 14:44
This lloks like two questions. Run command without
sudo
(use /etc/sudoers.d) for group netdev
and find which group (top) a command runs under! Which should it be?– George Udosen
Dec 13 '18 at 14:44
2
2
I'm not sure that's really the right question: in the example you give, AFAIK it's not about permissions required to run the program, it's about the permissions required for the program to modify a device file
– steeldriver
Dec 13 '18 at 14:47
I'm not sure that's really the right question: in the example you give, AFAIK it's not about permissions required to run the program, it's about the permissions required for the program to modify a device file
– steeldriver
Dec 13 '18 at 14:47
I think he means how do you know which group you should add to user so the user don't have to use sudo.
– Alvin Liang
Dec 13 '18 at 14:51
I think he means how do you know which group you should add to user so the user don't have to use sudo.
– Alvin Liang
Dec 13 '18 at 14:51
@AlvinLiang yes that's what I mean.
– Kev Inski
Dec 13 '18 at 18:11
@AlvinLiang yes that's what I mean.
– Kev Inski
Dec 13 '18 at 18:11
add a comment |
1 Answer
1
active
oldest
votes
First run the command (I wish you'd told us which) without sudo
. Take note of the device(s) mentioned in the error message.
Use ls -l
, followed by the device(s), e.g.
walt@bat:~(0)$ ls -l /dev/ttyS1
crw-rw---- 1 root dialout 4, 65 Dec 13 08:34 /dev/ttyS1
This device allows rw
access for the owner (root
) and members of the dialout
group.
To add yourself to the dialout
group,
sudo adduser $USER dialout
To make use of your new dialout
group membership, either log out and log in, or newgrp dialout
to start a shell with that group membership.
I am looking for a general answer. But let's assume I use the commandbrctl addbr
. I prefer using the commandusermod
to add a user to a existing group. So your solution basically is:ls - l $(which brctl)
or something similar to get the group?
– Kev Inski
Dec 13 '18 at 21:03
I don't think there's general answer. If document does not say anything and you don't guess, how do you know which device it will use?
– Alvin Liang
Dec 14 '18 at 3:22
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/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
});
}
});
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%2f1100629%2fhow-to-know-what-program-needs-which-group-to-be-executed-without-sudo%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
First run the command (I wish you'd told us which) without sudo
. Take note of the device(s) mentioned in the error message.
Use ls -l
, followed by the device(s), e.g.
walt@bat:~(0)$ ls -l /dev/ttyS1
crw-rw---- 1 root dialout 4, 65 Dec 13 08:34 /dev/ttyS1
This device allows rw
access for the owner (root
) and members of the dialout
group.
To add yourself to the dialout
group,
sudo adduser $USER dialout
To make use of your new dialout
group membership, either log out and log in, or newgrp dialout
to start a shell with that group membership.
I am looking for a general answer. But let's assume I use the commandbrctl addbr
. I prefer using the commandusermod
to add a user to a existing group. So your solution basically is:ls - l $(which brctl)
or something similar to get the group?
– Kev Inski
Dec 13 '18 at 21:03
I don't think there's general answer. If document does not say anything and you don't guess, how do you know which device it will use?
– Alvin Liang
Dec 14 '18 at 3:22
add a comment |
First run the command (I wish you'd told us which) without sudo
. Take note of the device(s) mentioned in the error message.
Use ls -l
, followed by the device(s), e.g.
walt@bat:~(0)$ ls -l /dev/ttyS1
crw-rw---- 1 root dialout 4, 65 Dec 13 08:34 /dev/ttyS1
This device allows rw
access for the owner (root
) and members of the dialout
group.
To add yourself to the dialout
group,
sudo adduser $USER dialout
To make use of your new dialout
group membership, either log out and log in, or newgrp dialout
to start a shell with that group membership.
I am looking for a general answer. But let's assume I use the commandbrctl addbr
. I prefer using the commandusermod
to add a user to a existing group. So your solution basically is:ls - l $(which brctl)
or something similar to get the group?
– Kev Inski
Dec 13 '18 at 21:03
I don't think there's general answer. If document does not say anything and you don't guess, how do you know which device it will use?
– Alvin Liang
Dec 14 '18 at 3:22
add a comment |
First run the command (I wish you'd told us which) without sudo
. Take note of the device(s) mentioned in the error message.
Use ls -l
, followed by the device(s), e.g.
walt@bat:~(0)$ ls -l /dev/ttyS1
crw-rw---- 1 root dialout 4, 65 Dec 13 08:34 /dev/ttyS1
This device allows rw
access for the owner (root
) and members of the dialout
group.
To add yourself to the dialout
group,
sudo adduser $USER dialout
To make use of your new dialout
group membership, either log out and log in, or newgrp dialout
to start a shell with that group membership.
First run the command (I wish you'd told us which) without sudo
. Take note of the device(s) mentioned in the error message.
Use ls -l
, followed by the device(s), e.g.
walt@bat:~(0)$ ls -l /dev/ttyS1
crw-rw---- 1 root dialout 4, 65 Dec 13 08:34 /dev/ttyS1
This device allows rw
access for the owner (root
) and members of the dialout
group.
To add yourself to the dialout
group,
sudo adduser $USER dialout
To make use of your new dialout
group membership, either log out and log in, or newgrp dialout
to start a shell with that group membership.
answered Dec 13 '18 at 19:28
waltinatorwaltinator
22k74169
22k74169
I am looking for a general answer. But let's assume I use the commandbrctl addbr
. I prefer using the commandusermod
to add a user to a existing group. So your solution basically is:ls - l $(which brctl)
or something similar to get the group?
– Kev Inski
Dec 13 '18 at 21:03
I don't think there's general answer. If document does not say anything and you don't guess, how do you know which device it will use?
– Alvin Liang
Dec 14 '18 at 3:22
add a comment |
I am looking for a general answer. But let's assume I use the commandbrctl addbr
. I prefer using the commandusermod
to add a user to a existing group. So your solution basically is:ls - l $(which brctl)
or something similar to get the group?
– Kev Inski
Dec 13 '18 at 21:03
I don't think there's general answer. If document does not say anything and you don't guess, how do you know which device it will use?
– Alvin Liang
Dec 14 '18 at 3:22
I am looking for a general answer. But let's assume I use the command
brctl addbr
. I prefer using the command usermod
to add a user to a existing group. So your solution basically is: ls - l $(which brctl)
or something similar to get the group?– Kev Inski
Dec 13 '18 at 21:03
I am looking for a general answer. But let's assume I use the command
brctl addbr
. I prefer using the command usermod
to add a user to a existing group. So your solution basically is: ls - l $(which brctl)
or something similar to get the group?– Kev Inski
Dec 13 '18 at 21:03
I don't think there's general answer. If document does not say anything and you don't guess, how do you know which device it will use?
– Alvin Liang
Dec 14 '18 at 3:22
I don't think there's general answer. If document does not say anything and you don't guess, how do you know which device it will use?
– Alvin Liang
Dec 14 '18 at 3:22
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%2f1100629%2fhow-to-know-what-program-needs-which-group-to-be-executed-without-sudo%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
This lloks like two questions. Run command without
sudo
(use /etc/sudoers.d) for groupnetdev
and find which group (top) a command runs under! Which should it be?– George Udosen
Dec 13 '18 at 14:44
2
I'm not sure that's really the right question: in the example you give, AFAIK it's not about permissions required to run the program, it's about the permissions required for the program to modify a device file
– steeldriver
Dec 13 '18 at 14:47
I think he means how do you know which group you should add to user so the user don't have to use sudo.
– Alvin Liang
Dec 13 '18 at 14:51
@AlvinLiang yes that's what I mean.
– Kev Inski
Dec 13 '18 at 18:11