After adding a group, logout+login is not enough in 18.04?
In ubuntu 18.04 with default desktop, behaviour of logout/login has changed:
Previously on an Ubuntu system, when I find that I need to add my user id to some group, it was sufficient to
sudo adduser ludwig docker # adds me to group docker
and then I had to logout and login again to make the group change effective.
I notice that with Ubuntu 18.04, after adding the group and logging out and back in, the list of effective groups is still unchanged.
As a workaround I rebooted the system, which is inconvenient (requires making the right selection in grub and re-entering the disk encryption password).
1) Why is the behaviour now like this?
2) Can I do something else short of rebooting?
(I know I can ssh into localhost and get the correct groups in the ssh session only. This is also too inconvenient.)
gnome login 18.04 groups
add a comment |
In ubuntu 18.04 with default desktop, behaviour of logout/login has changed:
Previously on an Ubuntu system, when I find that I need to add my user id to some group, it was sufficient to
sudo adduser ludwig docker # adds me to group docker
and then I had to logout and login again to make the group change effective.
I notice that with Ubuntu 18.04, after adding the group and logging out and back in, the list of effective groups is still unchanged.
As a workaround I rebooted the system, which is inconvenient (requires making the right selection in grub and re-entering the disk encryption password).
1) Why is the behaviour now like this?
2) Can I do something else short of rebooting?
(I know I can ssh into localhost and get the correct groups in the ssh session only. This is also too inconvenient.)
gnome login 18.04 groups
I testedsudo usermod -a -G group user
in 18.04 and logged out and back in and it worked.
– Terrance
Jun 12 '18 at 18:39
also with default desktop?
– Ludwig Schulze
Jun 12 '18 at 19:38
You mean like the difference between GNOME, Xubuntu, Kubuntu, etc.? If you mean that GNOME is the default, then no, I don't run GNOME. But the command should be the same regardless of desktop environment as this is core password / group stuff that should be the same across all DEs.
– Terrance
Jun 12 '18 at 20:56
OK, I just installed GNOME for testing, andsudo usermod -a -G groupname username
worked fine there as well. Logged out and back in and my change was there.
– Terrance
Jun 12 '18 at 21:05
I see. @Terrance you are not using the default desktop. The default desktop is named "ubuntu". I know it is based on gnome, but I understand that "gnome" is another desktop. "ubuntu" was altered to resemble unity.
– Ludwig Schulze
Jun 13 '18 at 21:39
add a comment |
In ubuntu 18.04 with default desktop, behaviour of logout/login has changed:
Previously on an Ubuntu system, when I find that I need to add my user id to some group, it was sufficient to
sudo adduser ludwig docker # adds me to group docker
and then I had to logout and login again to make the group change effective.
I notice that with Ubuntu 18.04, after adding the group and logging out and back in, the list of effective groups is still unchanged.
As a workaround I rebooted the system, which is inconvenient (requires making the right selection in grub and re-entering the disk encryption password).
1) Why is the behaviour now like this?
2) Can I do something else short of rebooting?
(I know I can ssh into localhost and get the correct groups in the ssh session only. This is also too inconvenient.)
gnome login 18.04 groups
In ubuntu 18.04 with default desktop, behaviour of logout/login has changed:
Previously on an Ubuntu system, when I find that I need to add my user id to some group, it was sufficient to
sudo adduser ludwig docker # adds me to group docker
and then I had to logout and login again to make the group change effective.
I notice that with Ubuntu 18.04, after adding the group and logging out and back in, the list of effective groups is still unchanged.
As a workaround I rebooted the system, which is inconvenient (requires making the right selection in grub and re-entering the disk encryption password).
1) Why is the behaviour now like this?
2) Can I do something else short of rebooting?
(I know I can ssh into localhost and get the correct groups in the ssh session only. This is also too inconvenient.)
gnome login 18.04 groups
gnome login 18.04 groups
asked Jun 12 '18 at 18:30
Ludwig SchulzeLudwig Schulze
1589
1589
I testedsudo usermod -a -G group user
in 18.04 and logged out and back in and it worked.
– Terrance
Jun 12 '18 at 18:39
also with default desktop?
– Ludwig Schulze
Jun 12 '18 at 19:38
You mean like the difference between GNOME, Xubuntu, Kubuntu, etc.? If you mean that GNOME is the default, then no, I don't run GNOME. But the command should be the same regardless of desktop environment as this is core password / group stuff that should be the same across all DEs.
– Terrance
Jun 12 '18 at 20:56
OK, I just installed GNOME for testing, andsudo usermod -a -G groupname username
worked fine there as well. Logged out and back in and my change was there.
– Terrance
Jun 12 '18 at 21:05
I see. @Terrance you are not using the default desktop. The default desktop is named "ubuntu". I know it is based on gnome, but I understand that "gnome" is another desktop. "ubuntu" was altered to resemble unity.
– Ludwig Schulze
Jun 13 '18 at 21:39
add a comment |
I testedsudo usermod -a -G group user
in 18.04 and logged out and back in and it worked.
– Terrance
Jun 12 '18 at 18:39
also with default desktop?
– Ludwig Schulze
Jun 12 '18 at 19:38
You mean like the difference between GNOME, Xubuntu, Kubuntu, etc.? If you mean that GNOME is the default, then no, I don't run GNOME. But the command should be the same regardless of desktop environment as this is core password / group stuff that should be the same across all DEs.
– Terrance
Jun 12 '18 at 20:56
OK, I just installed GNOME for testing, andsudo usermod -a -G groupname username
worked fine there as well. Logged out and back in and my change was there.
– Terrance
Jun 12 '18 at 21:05
I see. @Terrance you are not using the default desktop. The default desktop is named "ubuntu". I know it is based on gnome, but I understand that "gnome" is another desktop. "ubuntu" was altered to resemble unity.
– Ludwig Schulze
Jun 13 '18 at 21:39
I tested
sudo usermod -a -G group user
in 18.04 and logged out and back in and it worked.– Terrance
Jun 12 '18 at 18:39
I tested
sudo usermod -a -G group user
in 18.04 and logged out and back in and it worked.– Terrance
Jun 12 '18 at 18:39
also with default desktop?
– Ludwig Schulze
Jun 12 '18 at 19:38
also with default desktop?
– Ludwig Schulze
Jun 12 '18 at 19:38
You mean like the difference between GNOME, Xubuntu, Kubuntu, etc.? If you mean that GNOME is the default, then no, I don't run GNOME. But the command should be the same regardless of desktop environment as this is core password / group stuff that should be the same across all DEs.
– Terrance
Jun 12 '18 at 20:56
You mean like the difference between GNOME, Xubuntu, Kubuntu, etc.? If you mean that GNOME is the default, then no, I don't run GNOME. But the command should be the same regardless of desktop environment as this is core password / group stuff that should be the same across all DEs.
– Terrance
Jun 12 '18 at 20:56
OK, I just installed GNOME for testing, and
sudo usermod -a -G groupname username
worked fine there as well. Logged out and back in and my change was there.– Terrance
Jun 12 '18 at 21:05
OK, I just installed GNOME for testing, and
sudo usermod -a -G groupname username
worked fine there as well. Logged out and back in and my change was there.– Terrance
Jun 12 '18 at 21:05
I see. @Terrance you are not using the default desktop. The default desktop is named "ubuntu". I know it is based on gnome, but I understand that "gnome" is another desktop. "ubuntu" was altered to resemble unity.
– Ludwig Schulze
Jun 13 '18 at 21:39
I see. @Terrance you are not using the default desktop. The default desktop is named "ubuntu". I know it is based on gnome, but I understand that "gnome" is another desktop. "ubuntu" was altered to resemble unity.
– Ludwig Schulze
Jun 13 '18 at 21:39
add a comment |
4 Answers
4
active
oldest
votes
When "logging out" of the default desktop in ubuntu 18.04, some of the user's processes are not terminated immediately, but linger around. These are (observed by another user):
$ ps axu | grep ^ludwig
ludwig 26508 0.3 0.2 77052 8308 ? Ss 23:32 0:00 /lib/systemd/systemd --user
ludwig 26509 0.0 0.0 261776 2968 ? S 23:32 0:00 (sd-pam)
ludwig 26691 0.2 0.3 381288 12204 ? S<l 23:32 0:00 /usr/bin/pulseaudio --start --log-target=syslog
ludwig 27352 0.0 0.0 49796 3756 ? Ss 23:33 0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
When logging back in before these processes exit voluntarily, then no new login session is created, but the old one is reused. This is the reason why the new group membership is not visible, it is still the same old login session.
A workaround to avoid rebooting is to wait ~20 seconds after logging out and only then logging back in. The processes exit somewhere between 10 and 20 seconds after logging out.
Edit:
As reported in the comments below, sometimes the lingering processes will not quit even with waiting, and after logging back in, the group memberships have not been updated. I found that in this case it helps to
ps axu | grep ^ludwig | awk '{print $2}' | xargs kill -9
Replace ludwig
with your user name. This kills all processes that belong to you. Use only when you're sure you have all your data in all your open programs saved.
This was my problem. But the processes did not go away after logging out and waiting. I had to kill the "systemd --user" process, and run "sudo systemctl daemon-reexec". And also kill all the dbus processes cause restarting systemd screws up dbus. Needed to restart network manager too. "systemctl restart network-manager" Maybe restart everything that depends on dbus/systemd
– niknah
Jun 20 '18 at 12:59
@niknah Oh that's bad. Sounds like it would be easier to just reboot in your case. Thanks for letting everyone know that it can be more difficult.
– Ludwig Schulze
Jun 26 '18 at 10:07
@niknah I ran into the same problem as you today. After logging out and waiting, some processes just would not quit. I found a workaround and will update this answer.
– Ludwig Schulze
Jul 24 '18 at 17:50
add a comment |
The command loginctl terminate-user <user>
worked for me. (Replace <user>
with your user name) You probably shouldn't run this when logged in though as it will kill all your processes.
confirmed working on Ubuntu 18.04. Much easier than ps&grep!
– AqD
Jan 29 at 4:04
add a comment |
A workaround in the current shell is to run "su " to have the new group without having to reboot.
As I said, this trick has to be applied to each shell. That's not global.
add a comment |
The processes remaining for the user after logout are related to systemd
usrtest 4150 4150 4150 1.7 0.1 77140 8500 ? Ss 22:46 0:00 /lib/systemd/systemd --user
usrtest 4151 4150 4150 0.0 0.0 280232 3084 ? S 22:46 0:00 (sd-pam)
usrtest 4610 4610 4610 0.2 0.0 49796 3824 ? Ss 22:47 0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
usrtest 4328 4327 4327 0.5 0.1 386100 12060 ? S
these processes are indeed launched by systemd on behalf of the user.
So I did the following test:
cat /etc/systemd/system/user@1000.service
KillMode=control-group
systemctl --system show -p KillMode user@1000.service
KillMode=control-group
after a logout/login operation, it seems to change this logout behaviour
after (yet) another logout/login following a usermod -a -G, the 'groups' command returns the added group. I don't like it because if these processes are lingering after logout there is probably a good reason (closing operations seems probable), but this problem feels definitely related to systemd.
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%2f1045993%2fafter-adding-a-group-logoutlogin-is-not-enough-in-18-04%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
When "logging out" of the default desktop in ubuntu 18.04, some of the user's processes are not terminated immediately, but linger around. These are (observed by another user):
$ ps axu | grep ^ludwig
ludwig 26508 0.3 0.2 77052 8308 ? Ss 23:32 0:00 /lib/systemd/systemd --user
ludwig 26509 0.0 0.0 261776 2968 ? S 23:32 0:00 (sd-pam)
ludwig 26691 0.2 0.3 381288 12204 ? S<l 23:32 0:00 /usr/bin/pulseaudio --start --log-target=syslog
ludwig 27352 0.0 0.0 49796 3756 ? Ss 23:33 0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
When logging back in before these processes exit voluntarily, then no new login session is created, but the old one is reused. This is the reason why the new group membership is not visible, it is still the same old login session.
A workaround to avoid rebooting is to wait ~20 seconds after logging out and only then logging back in. The processes exit somewhere between 10 and 20 seconds after logging out.
Edit:
As reported in the comments below, sometimes the lingering processes will not quit even with waiting, and after logging back in, the group memberships have not been updated. I found that in this case it helps to
ps axu | grep ^ludwig | awk '{print $2}' | xargs kill -9
Replace ludwig
with your user name. This kills all processes that belong to you. Use only when you're sure you have all your data in all your open programs saved.
This was my problem. But the processes did not go away after logging out and waiting. I had to kill the "systemd --user" process, and run "sudo systemctl daemon-reexec". And also kill all the dbus processes cause restarting systemd screws up dbus. Needed to restart network manager too. "systemctl restart network-manager" Maybe restart everything that depends on dbus/systemd
– niknah
Jun 20 '18 at 12:59
@niknah Oh that's bad. Sounds like it would be easier to just reboot in your case. Thanks for letting everyone know that it can be more difficult.
– Ludwig Schulze
Jun 26 '18 at 10:07
@niknah I ran into the same problem as you today. After logging out and waiting, some processes just would not quit. I found a workaround and will update this answer.
– Ludwig Schulze
Jul 24 '18 at 17:50
add a comment |
When "logging out" of the default desktop in ubuntu 18.04, some of the user's processes are not terminated immediately, but linger around. These are (observed by another user):
$ ps axu | grep ^ludwig
ludwig 26508 0.3 0.2 77052 8308 ? Ss 23:32 0:00 /lib/systemd/systemd --user
ludwig 26509 0.0 0.0 261776 2968 ? S 23:32 0:00 (sd-pam)
ludwig 26691 0.2 0.3 381288 12204 ? S<l 23:32 0:00 /usr/bin/pulseaudio --start --log-target=syslog
ludwig 27352 0.0 0.0 49796 3756 ? Ss 23:33 0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
When logging back in before these processes exit voluntarily, then no new login session is created, but the old one is reused. This is the reason why the new group membership is not visible, it is still the same old login session.
A workaround to avoid rebooting is to wait ~20 seconds after logging out and only then logging back in. The processes exit somewhere between 10 and 20 seconds after logging out.
Edit:
As reported in the comments below, sometimes the lingering processes will not quit even with waiting, and after logging back in, the group memberships have not been updated. I found that in this case it helps to
ps axu | grep ^ludwig | awk '{print $2}' | xargs kill -9
Replace ludwig
with your user name. This kills all processes that belong to you. Use only when you're sure you have all your data in all your open programs saved.
This was my problem. But the processes did not go away after logging out and waiting. I had to kill the "systemd --user" process, and run "sudo systemctl daemon-reexec". And also kill all the dbus processes cause restarting systemd screws up dbus. Needed to restart network manager too. "systemctl restart network-manager" Maybe restart everything that depends on dbus/systemd
– niknah
Jun 20 '18 at 12:59
@niknah Oh that's bad. Sounds like it would be easier to just reboot in your case. Thanks for letting everyone know that it can be more difficult.
– Ludwig Schulze
Jun 26 '18 at 10:07
@niknah I ran into the same problem as you today. After logging out and waiting, some processes just would not quit. I found a workaround and will update this answer.
– Ludwig Schulze
Jul 24 '18 at 17:50
add a comment |
When "logging out" of the default desktop in ubuntu 18.04, some of the user's processes are not terminated immediately, but linger around. These are (observed by another user):
$ ps axu | grep ^ludwig
ludwig 26508 0.3 0.2 77052 8308 ? Ss 23:32 0:00 /lib/systemd/systemd --user
ludwig 26509 0.0 0.0 261776 2968 ? S 23:32 0:00 (sd-pam)
ludwig 26691 0.2 0.3 381288 12204 ? S<l 23:32 0:00 /usr/bin/pulseaudio --start --log-target=syslog
ludwig 27352 0.0 0.0 49796 3756 ? Ss 23:33 0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
When logging back in before these processes exit voluntarily, then no new login session is created, but the old one is reused. This is the reason why the new group membership is not visible, it is still the same old login session.
A workaround to avoid rebooting is to wait ~20 seconds after logging out and only then logging back in. The processes exit somewhere between 10 and 20 seconds after logging out.
Edit:
As reported in the comments below, sometimes the lingering processes will not quit even with waiting, and after logging back in, the group memberships have not been updated. I found that in this case it helps to
ps axu | grep ^ludwig | awk '{print $2}' | xargs kill -9
Replace ludwig
with your user name. This kills all processes that belong to you. Use only when you're sure you have all your data in all your open programs saved.
When "logging out" of the default desktop in ubuntu 18.04, some of the user's processes are not terminated immediately, but linger around. These are (observed by another user):
$ ps axu | grep ^ludwig
ludwig 26508 0.3 0.2 77052 8308 ? Ss 23:32 0:00 /lib/systemd/systemd --user
ludwig 26509 0.0 0.0 261776 2968 ? S 23:32 0:00 (sd-pam)
ludwig 26691 0.2 0.3 381288 12204 ? S<l 23:32 0:00 /usr/bin/pulseaudio --start --log-target=syslog
ludwig 27352 0.0 0.0 49796 3756 ? Ss 23:33 0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
When logging back in before these processes exit voluntarily, then no new login session is created, but the old one is reused. This is the reason why the new group membership is not visible, it is still the same old login session.
A workaround to avoid rebooting is to wait ~20 seconds after logging out and only then logging back in. The processes exit somewhere between 10 and 20 seconds after logging out.
Edit:
As reported in the comments below, sometimes the lingering processes will not quit even with waiting, and after logging back in, the group memberships have not been updated. I found that in this case it helps to
ps axu | grep ^ludwig | awk '{print $2}' | xargs kill -9
Replace ludwig
with your user name. This kills all processes that belong to you. Use only when you're sure you have all your data in all your open programs saved.
edited Jul 24 '18 at 17:57
answered Jun 13 '18 at 21:53
Ludwig SchulzeLudwig Schulze
1589
1589
This was my problem. But the processes did not go away after logging out and waiting. I had to kill the "systemd --user" process, and run "sudo systemctl daemon-reexec". And also kill all the dbus processes cause restarting systemd screws up dbus. Needed to restart network manager too. "systemctl restart network-manager" Maybe restart everything that depends on dbus/systemd
– niknah
Jun 20 '18 at 12:59
@niknah Oh that's bad. Sounds like it would be easier to just reboot in your case. Thanks for letting everyone know that it can be more difficult.
– Ludwig Schulze
Jun 26 '18 at 10:07
@niknah I ran into the same problem as you today. After logging out and waiting, some processes just would not quit. I found a workaround and will update this answer.
– Ludwig Schulze
Jul 24 '18 at 17:50
add a comment |
This was my problem. But the processes did not go away after logging out and waiting. I had to kill the "systemd --user" process, and run "sudo systemctl daemon-reexec". And also kill all the dbus processes cause restarting systemd screws up dbus. Needed to restart network manager too. "systemctl restart network-manager" Maybe restart everything that depends on dbus/systemd
– niknah
Jun 20 '18 at 12:59
@niknah Oh that's bad. Sounds like it would be easier to just reboot in your case. Thanks for letting everyone know that it can be more difficult.
– Ludwig Schulze
Jun 26 '18 at 10:07
@niknah I ran into the same problem as you today. After logging out and waiting, some processes just would not quit. I found a workaround and will update this answer.
– Ludwig Schulze
Jul 24 '18 at 17:50
This was my problem. But the processes did not go away after logging out and waiting. I had to kill the "systemd --user" process, and run "sudo systemctl daemon-reexec". And also kill all the dbus processes cause restarting systemd screws up dbus. Needed to restart network manager too. "systemctl restart network-manager" Maybe restart everything that depends on dbus/systemd
– niknah
Jun 20 '18 at 12:59
This was my problem. But the processes did not go away after logging out and waiting. I had to kill the "systemd --user" process, and run "sudo systemctl daemon-reexec". And also kill all the dbus processes cause restarting systemd screws up dbus. Needed to restart network manager too. "systemctl restart network-manager" Maybe restart everything that depends on dbus/systemd
– niknah
Jun 20 '18 at 12:59
@niknah Oh that's bad. Sounds like it would be easier to just reboot in your case. Thanks for letting everyone know that it can be more difficult.
– Ludwig Schulze
Jun 26 '18 at 10:07
@niknah Oh that's bad. Sounds like it would be easier to just reboot in your case. Thanks for letting everyone know that it can be more difficult.
– Ludwig Schulze
Jun 26 '18 at 10:07
@niknah I ran into the same problem as you today. After logging out and waiting, some processes just would not quit. I found a workaround and will update this answer.
– Ludwig Schulze
Jul 24 '18 at 17:50
@niknah I ran into the same problem as you today. After logging out and waiting, some processes just would not quit. I found a workaround and will update this answer.
– Ludwig Schulze
Jul 24 '18 at 17:50
add a comment |
The command loginctl terminate-user <user>
worked for me. (Replace <user>
with your user name) You probably shouldn't run this when logged in though as it will kill all your processes.
confirmed working on Ubuntu 18.04. Much easier than ps&grep!
– AqD
Jan 29 at 4:04
add a comment |
The command loginctl terminate-user <user>
worked for me. (Replace <user>
with your user name) You probably shouldn't run this when logged in though as it will kill all your processes.
confirmed working on Ubuntu 18.04. Much easier than ps&grep!
– AqD
Jan 29 at 4:04
add a comment |
The command loginctl terminate-user <user>
worked for me. (Replace <user>
with your user name) You probably shouldn't run this when logged in though as it will kill all your processes.
The command loginctl terminate-user <user>
worked for me. (Replace <user>
with your user name) You probably shouldn't run this when logged in though as it will kill all your processes.
answered Jan 28 at 2:26
iczeroiczero
213
213
confirmed working on Ubuntu 18.04. Much easier than ps&grep!
– AqD
Jan 29 at 4:04
add a comment |
confirmed working on Ubuntu 18.04. Much easier than ps&grep!
– AqD
Jan 29 at 4:04
confirmed working on Ubuntu 18.04. Much easier than ps&grep!
– AqD
Jan 29 at 4:04
confirmed working on Ubuntu 18.04. Much easier than ps&grep!
– AqD
Jan 29 at 4:04
add a comment |
A workaround in the current shell is to run "su " to have the new group without having to reboot.
As I said, this trick has to be applied to each shell. That's not global.
add a comment |
A workaround in the current shell is to run "su " to have the new group without having to reboot.
As I said, this trick has to be applied to each shell. That's not global.
add a comment |
A workaround in the current shell is to run "su " to have the new group without having to reboot.
As I said, this trick has to be applied to each shell. That's not global.
A workaround in the current shell is to run "su " to have the new group without having to reboot.
As I said, this trick has to be applied to each shell. That's not global.
answered Nov 19 '18 at 16:54
Michael OpdenackerMichael Opdenacker
1817
1817
add a comment |
add a comment |
The processes remaining for the user after logout are related to systemd
usrtest 4150 4150 4150 1.7 0.1 77140 8500 ? Ss 22:46 0:00 /lib/systemd/systemd --user
usrtest 4151 4150 4150 0.0 0.0 280232 3084 ? S 22:46 0:00 (sd-pam)
usrtest 4610 4610 4610 0.2 0.0 49796 3824 ? Ss 22:47 0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
usrtest 4328 4327 4327 0.5 0.1 386100 12060 ? S
these processes are indeed launched by systemd on behalf of the user.
So I did the following test:
cat /etc/systemd/system/user@1000.service
KillMode=control-group
systemctl --system show -p KillMode user@1000.service
KillMode=control-group
after a logout/login operation, it seems to change this logout behaviour
after (yet) another logout/login following a usermod -a -G, the 'groups' command returns the added group. I don't like it because if these processes are lingering after logout there is probably a good reason (closing operations seems probable), but this problem feels definitely related to systemd.
add a comment |
The processes remaining for the user after logout are related to systemd
usrtest 4150 4150 4150 1.7 0.1 77140 8500 ? Ss 22:46 0:00 /lib/systemd/systemd --user
usrtest 4151 4150 4150 0.0 0.0 280232 3084 ? S 22:46 0:00 (sd-pam)
usrtest 4610 4610 4610 0.2 0.0 49796 3824 ? Ss 22:47 0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
usrtest 4328 4327 4327 0.5 0.1 386100 12060 ? S
these processes are indeed launched by systemd on behalf of the user.
So I did the following test:
cat /etc/systemd/system/user@1000.service
KillMode=control-group
systemctl --system show -p KillMode user@1000.service
KillMode=control-group
after a logout/login operation, it seems to change this logout behaviour
after (yet) another logout/login following a usermod -a -G, the 'groups' command returns the added group. I don't like it because if these processes are lingering after logout there is probably a good reason (closing operations seems probable), but this problem feels definitely related to systemd.
add a comment |
The processes remaining for the user after logout are related to systemd
usrtest 4150 4150 4150 1.7 0.1 77140 8500 ? Ss 22:46 0:00 /lib/systemd/systemd --user
usrtest 4151 4150 4150 0.0 0.0 280232 3084 ? S 22:46 0:00 (sd-pam)
usrtest 4610 4610 4610 0.2 0.0 49796 3824 ? Ss 22:47 0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
usrtest 4328 4327 4327 0.5 0.1 386100 12060 ? S
these processes are indeed launched by systemd on behalf of the user.
So I did the following test:
cat /etc/systemd/system/user@1000.service
KillMode=control-group
systemctl --system show -p KillMode user@1000.service
KillMode=control-group
after a logout/login operation, it seems to change this logout behaviour
after (yet) another logout/login following a usermod -a -G, the 'groups' command returns the added group. I don't like it because if these processes are lingering after logout there is probably a good reason (closing operations seems probable), but this problem feels definitely related to systemd.
The processes remaining for the user after logout are related to systemd
usrtest 4150 4150 4150 1.7 0.1 77140 8500 ? Ss 22:46 0:00 /lib/systemd/systemd --user
usrtest 4151 4150 4150 0.0 0.0 280232 3084 ? S 22:46 0:00 (sd-pam)
usrtest 4610 4610 4610 0.2 0.0 49796 3824 ? Ss 22:47 0:00 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
usrtest 4328 4327 4327 0.5 0.1 386100 12060 ? S
these processes are indeed launched by systemd on behalf of the user.
So I did the following test:
cat /etc/systemd/system/user@1000.service
KillMode=control-group
systemctl --system show -p KillMode user@1000.service
KillMode=control-group
after a logout/login operation, it seems to change this logout behaviour
after (yet) another logout/login following a usermod -a -G, the 'groups' command returns the added group. I don't like it because if these processes are lingering after logout there is probably a good reason (closing operations seems probable), but this problem feels definitely related to systemd.
answered Feb 5 at 23:40
user921704user921704
1
1
add a comment |
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%2f1045993%2fafter-adding-a-group-logoutlogin-is-not-enough-in-18-04%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
I tested
sudo usermod -a -G group user
in 18.04 and logged out and back in and it worked.– Terrance
Jun 12 '18 at 18:39
also with default desktop?
– Ludwig Schulze
Jun 12 '18 at 19:38
You mean like the difference between GNOME, Xubuntu, Kubuntu, etc.? If you mean that GNOME is the default, then no, I don't run GNOME. But the command should be the same regardless of desktop environment as this is core password / group stuff that should be the same across all DEs.
– Terrance
Jun 12 '18 at 20:56
OK, I just installed GNOME for testing, and
sudo usermod -a -G groupname username
worked fine there as well. Logged out and back in and my change was there.– Terrance
Jun 12 '18 at 21:05
I see. @Terrance you are not using the default desktop. The default desktop is named "ubuntu". I know it is based on gnome, but I understand that "gnome" is another desktop. "ubuntu" was altered to resemble unity.
– Ludwig Schulze
Jun 13 '18 at 21:39