• Re: add user to a group and logout/login to apply

    From Dan Purgert@21:1/5 to Vasyl Vavrychuk on Sun Feb 2 17:10:01 2025
    On Feb 02, 2025, 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?

    Logout/login used to be sufficient for essentially everything. Changes
    to DEs and login managers have made it less viable nowadays.

    Though it seems that if you don't have a login manager / DE launching at startup, logout/login seems to still work.

    --
    |_|O|_|
    |_|_|O| Github: https://github.com/dpurgert
    |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEE3asj+xn6fYUcweBnbWVw5UznKGAFAmefl9wACgkQbWVw5Uzn KGCBeQ/+L30W0DQCN4ecqiHYuKjRedCfqxYryF1z146pMbgfofdu3KyP33QUfmW8 Ti/ic8yCDUDbxwSCdqXVy2ZFYxSzeXygNouGi0HWHKz1vZjjR0YkqD6akbeUBV+Q ez7S7WfkQpSbLeHeMOdVfNw3whzVuZi95hUNUe86Crl8KObDmKewGeJRKiMU7WR3 Fa7I9KApdLirOP+VBmtAAMT7UHVp3xG4MZdN1QIAY0GuBjiuP+KbSRXdlL0efAHk r2R03gPM1ljeJQHazISk+3jq+k5TXjBU3xYLenyRR69D9p0UoWo2ym7BAOEqZtcJ 9pGlpu75V469jpHFZKLCGTWgt/ZlfdaeApSgjYTx02XnAxiJXMMHB8ldnS3Kc+1Z 1X5mibG36c8vjWHj2K6Z01jvC6lAMzEl/FHjz03MoZYhtXR6UJww/Mh1zvPxbnVt tQcXJzkoRe9zOONqUNPTGfCVmsHYoJ5NBwkUu+Zj3SnHOSPXNn2tah+ZnqPja21q TwUnbQkbif+KVt6nBkh0feoXMXD59Vprnsq9qAD87bB54XI10eV2wRrgF3cuEzVA aH+5Frtj/pbzZOC/tVt+32NZ+YmUNAMTNQhfLTF4F9Lflj3Qd28Ilo9wqemGTM7K Ye2/3d6H050NyH5WIltay9jbeOu3uEXwXuE11HGtRYfibGXEzGQ=
    =EeKX
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Us
  • From Henning Follmann@21:1/5 to Vasyl Vavrychuk on Sun Feb 2 18:40:01 2025
    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.

    -H


    --
    Henning Follmann | [email protected]

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Joe on Sun Feb 2 22:30:01 2025
    On Sun, Feb 02, 2025 at 21:19:18 +0000, Joe wrote:
    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.

    That's correct, and also:

    * "id USERNAME" (passing an argument) will tell you what that user's
    group memberships will be when they login.

    * "id" (no argument) tells you what your group memberships are *now*
    in your current shell.

    This may be easier than scanning the entire output of cat /etc/group,
    or typing out a grep command. It becomes even more useful if your
    system is using something other than /etc/group to define group
    memberships (NIS, NIS+, LDAP, etc.).

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Joe@21:1/5 to Henning Follmann on Sun Feb 2 22:20:01 2025
    On Sun, 2 Feb 2025 12:30:39 -0500
    Henning Follmann <[email protected]> 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.

    --
    Joe

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Greg Wooledge@21:1/5 to Nicholas Geovanis on Mon Feb 3 00:20:01 2025
    On Sun, Feb 02, 2025 at 16:55:25 -0600, Nicholas Geovanis wrote:
    Don't you need to use "newgrp" to change the current running group
    membership of existing sessions?

    That doesn't change a *session*. It just creates a single shell with
    the updated permissions.

    Your window manager, your systemd --user services, your dbus services,
    your existing terminals and shells (other than that *one*), your web
    browser, etc. will all continue running with the old permissions.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)