On Sun, 2 Feb 2025 12:30:39 -0500
Henning Follmann <hfollmann@itcfollmann.com> wrote:
> On Sun, Feb 02, 2025 at 05:51:47PM +0200, Vasyl Vavrychuk wrote:
> > Debian reference
> > (https://www.debian.org/doc/manuals/debian-reference/ch01.en.html#_permissions_for_groups_of_users_group)
> > says one of the option to apply change of group user configuration
> > is
> > > Logout via GUI menu and login.
> >
> > It is not marked as "Best option" such as
> >
> > > Cold reboot and login. (Best option)
> >
> > but per my understanding, it does not mean that it does not work.
> >
> > On the other hand, I've checked that with Debian 12 and GNOME it is
> > not enough to logout and login to see that a user is added to a
> > group.
> >
> > Any comments?
> >
>
> Yes, I think that is not true. If you logout and login (assuming that
> this is the modified user) that works.
>
For a simple DE, just cat /etc/group will check that a group add
command worked. The next login will make use of the group membership.
If any of the big DEs muck around with this system, it would seem to be
a backward step. There are extremely few reasons for a properly
designed Linux installation to need rebooting. Certainly group
membership on a server may need alteration with employees joining and
leaving, and this would be an extremely trivial reason to need to reboot
one.
Don't you need to use "newgrp" to change the current running group membership of existing sessions? And you might need to script that for changing the group membership of all current existing subprocesses of your desktop session, maybe dozens of processes. So it's easier to logout and back in.