git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Output from 'groups' is suddently different to /etc/group


On Fri, 2018-07-20 at 11:35 +0200, R. Diez via ubuntu-users wrote:
> I found it unfortunate that the installer (Synaptic) did not warn me 
> that I had to log out and in again. I expected that everything would 
> work straight away, but my user account was not immediately a member
> of those groups. I guess that this is a limitation of the underlying
> Debian APT system.

I've never used a Unix (and I've used quite a few) where you could
modify groups and the changes would apply without logging out and back
in.

> $ groups
> rdiez
> 
> $ groups $USER
> rdiez : rdiez adm tty dialout cdrom sudo dip plugdev fuse lpadmin 
> sambashare wireshark libvirtd

>From "man groups":

   "Print group memberships for each USERNAME or, 
    if no USERNAME is specified, for the current
    process (which may differ if the groups
    database has changed)."

> If I go through "su", group membership is fine again:

Of course, because it is a new login shell.

I'm not sure what your actual problem is. Are you saying that the above
situation persists even after logging out and back in, or even after
e.g. a reboot?

If so, posting your passwd and group files (sanitised please!) might
reveal the problem.

Or are you saying that you expect, on a new install, for your user ID
to automatically be a member of certain groups by default, and you are
disappointed that the set of groups you are in by default is not the
set you expected?

As far as me emailing you personally because you can't be bothered to
participate in the group - no. You'll get this answer when you check
the archives I guess. In the meantime, maybe it will help someone
else.

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer
http://twitter.com/kauer389

GPG fingerprint: A0CD 28F0 10BE FC21 C57C 67C1 19A6 83A4 9B0B 1D75
Old fingerprint: A52E F6B9 708B 51C4 85E6 1634 0571 ADF9 3C1C 6A3A