Why adding a user to the sudo group before we install sudo package doesn't work?
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I just did this "mistake" and it took me a while to figure it out! Can anybody explain me what happens behind the scenes of this "bug"? Thanks in advance :)
linux sudo group
add a comment |Â
up vote
2
down vote
favorite
I just did this "mistake" and it took me a while to figure it out! Can anybody explain me what happens behind the scenes of this "bug"? Thanks in advance :)
linux sudo group
Out of interest, which Linux distribution (or Unix version) did you discover this on?
â roaima
Apr 29 at 6:51
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I just did this "mistake" and it took me a while to figure it out! Can anybody explain me what happens behind the scenes of this "bug"? Thanks in advance :)
linux sudo group
I just did this "mistake" and it took me a while to figure it out! Can anybody explain me what happens behind the scenes of this "bug"? Thanks in advance :)
linux sudo group
asked Apr 28 at 23:07
JAAAY
14115
14115
Out of interest, which Linux distribution (or Unix version) did you discover this on?
â roaima
Apr 29 at 6:51
add a comment |Â
Out of interest, which Linux distribution (or Unix version) did you discover this on?
â roaima
Apr 29 at 6:51
Out of interest, which Linux distribution (or Unix version) did you discover this on?
â roaima
Apr 29 at 6:51
Out of interest, which Linux distribution (or Unix version) did you discover this on?
â roaima
Apr 29 at 6:51
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
This is really just how your distro had packaged sudo.
There's nothing special about the sudo group, it's just a normal Linux group.
The power of the sudo group comes from being listed in /etc/sudoers(.d) as being allowed to elevate to root for any commands.
There are a couple things that is necessary for sudo to work:
- sudo executable needs to be setgid
- your user or a group your user is in must be listed in /etc/sudoers.d
- your user must be logged into the group when running sudo
If either of these is untrue, for example, if your distro recreated the sudo group, for example because it wants the sudo group to have a specific gid, while installing sudo for the first time, then it's possible that your sudo won't work.
Another common mistake is that right after adding a user to a group, your existing process won't have the new permission immediately, you'll need to either use grp or restart the login shell to get the permissions of the new group.
In fact, I accepted this question cause it sound informative to me. But the real case was that when you add a user to a group, changes will take effect from the next time he logs in.
â JAAAY
Apr 29 at 8:31
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
This is really just how your distro had packaged sudo.
There's nothing special about the sudo group, it's just a normal Linux group.
The power of the sudo group comes from being listed in /etc/sudoers(.d) as being allowed to elevate to root for any commands.
There are a couple things that is necessary for sudo to work:
- sudo executable needs to be setgid
- your user or a group your user is in must be listed in /etc/sudoers.d
- your user must be logged into the group when running sudo
If either of these is untrue, for example, if your distro recreated the sudo group, for example because it wants the sudo group to have a specific gid, while installing sudo for the first time, then it's possible that your sudo won't work.
Another common mistake is that right after adding a user to a group, your existing process won't have the new permission immediately, you'll need to either use grp or restart the login shell to get the permissions of the new group.
In fact, I accepted this question cause it sound informative to me. But the real case was that when you add a user to a group, changes will take effect from the next time he logs in.
â JAAAY
Apr 29 at 8:31
add a comment |Â
up vote
3
down vote
accepted
This is really just how your distro had packaged sudo.
There's nothing special about the sudo group, it's just a normal Linux group.
The power of the sudo group comes from being listed in /etc/sudoers(.d) as being allowed to elevate to root for any commands.
There are a couple things that is necessary for sudo to work:
- sudo executable needs to be setgid
- your user or a group your user is in must be listed in /etc/sudoers.d
- your user must be logged into the group when running sudo
If either of these is untrue, for example, if your distro recreated the sudo group, for example because it wants the sudo group to have a specific gid, while installing sudo for the first time, then it's possible that your sudo won't work.
Another common mistake is that right after adding a user to a group, your existing process won't have the new permission immediately, you'll need to either use grp or restart the login shell to get the permissions of the new group.
In fact, I accepted this question cause it sound informative to me. But the real case was that when you add a user to a group, changes will take effect from the next time he logs in.
â JAAAY
Apr 29 at 8:31
add a comment |Â
up vote
3
down vote
accepted
up vote
3
down vote
accepted
This is really just how your distro had packaged sudo.
There's nothing special about the sudo group, it's just a normal Linux group.
The power of the sudo group comes from being listed in /etc/sudoers(.d) as being allowed to elevate to root for any commands.
There are a couple things that is necessary for sudo to work:
- sudo executable needs to be setgid
- your user or a group your user is in must be listed in /etc/sudoers.d
- your user must be logged into the group when running sudo
If either of these is untrue, for example, if your distro recreated the sudo group, for example because it wants the sudo group to have a specific gid, while installing sudo for the first time, then it's possible that your sudo won't work.
Another common mistake is that right after adding a user to a group, your existing process won't have the new permission immediately, you'll need to either use grp or restart the login shell to get the permissions of the new group.
This is really just how your distro had packaged sudo.
There's nothing special about the sudo group, it's just a normal Linux group.
The power of the sudo group comes from being listed in /etc/sudoers(.d) as being allowed to elevate to root for any commands.
There are a couple things that is necessary for sudo to work:
- sudo executable needs to be setgid
- your user or a group your user is in must be listed in /etc/sudoers.d
- your user must be logged into the group when running sudo
If either of these is untrue, for example, if your distro recreated the sudo group, for example because it wants the sudo group to have a specific gid, while installing sudo for the first time, then it's possible that your sudo won't work.
Another common mistake is that right after adding a user to a group, your existing process won't have the new permission immediately, you'll need to either use grp or restart the login shell to get the permissions of the new group.
answered Apr 28 at 23:30
Lie Ryan
61337
61337
In fact, I accepted this question cause it sound informative to me. But the real case was that when you add a user to a group, changes will take effect from the next time he logs in.
â JAAAY
Apr 29 at 8:31
add a comment |Â
In fact, I accepted this question cause it sound informative to me. But the real case was that when you add a user to a group, changes will take effect from the next time he logs in.
â JAAAY
Apr 29 at 8:31
In fact, I accepted this question cause it sound informative to me. But the real case was that when you add a user to a group, changes will take effect from the next time he logs in.
â JAAAY
Apr 29 at 8:31
In fact, I accepted this question cause it sound informative to me. But the real case was that when you add a user to a group, changes will take effect from the next time he logs in.
â JAAAY
Apr 29 at 8:31
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f440659%2fwhy-adding-a-user-to-the-sudo-group-before-we-install-sudo-package-doesnt-work%23new-answer', 'question_page');
);
Post as a guest
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
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
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
Out of interest, which Linux distribution (or Unix version) did you discover this on?
â roaima
Apr 29 at 6:51