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

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Ubuntu mailing list

 >> 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.

Yes, but how would I know that the package I just installed has changed
group membership? Or should I assume the worst and restart my system
after installing every package, like on Windows?


 > 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?

Yes. I have rebooted a few times in the meantime, and the problem is
still there.


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

I am not sure what I should sanitise, so I'm hoping that posting them
unmodified is OK:


---- /etc/passwd ----

root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System
(admin):/var/lib/gnats:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
syslog:x:101:104::/home/syslog:/bin/false
messagebus:x:102:106::/var/run/dbus:/bin/false
usbmux:x:103:46:usbmux daemon:/home/usbmux:/bin/false
dnsmasq:x:104:65534:dnsmasq:/var/lib/misc:/bin/false
avahi-autoipd:x:105:113:Avahi autoip
daemon:/var/lib/avahi-autoipd:/bin/false
kernoops:x:106:65534:Kernel Oops Tracking Daemon:/:/bin/false
rtkit:x:107:114:RealtimeKit:/proc:/bin/false
saned:x:108:115::/var/lib/saned:/bin/false
whoopsie:x:109:116::/nonexistent:/bin/false
avahi:x:110:117:Avahi mDNS daemon:/var/run/avahi-daemon:/bin/false
lightdm:x:111:118:Light Display Manager:/var/lib/lightdm:/bin/false
colord:x:112:121:colord colour management daemon:/var/lib/colord:/bin/false
hplip:x:113:7:HPLIP system user:/var/run/hplip:/bin/false
pulse:x:114:122:PulseAudio daemon:/var/run/pulse:/bin/false
rdiez:x:1000:1000:rdiez:/home/rdiez:/bin/bash
postfix:x:115:125::/var/spool/postfix:/bin/false
sshd:x:116:65534::/var/run/sshd:/usr/sbin/nologin
dictd:x:117:127:Dictd Server:/var/lib/dictd:/bin/false
debian-spamd:x:118:128::/var/lib/spamassassin:/bin/sh
davfs2:x:119:131::/var/cache/davfs2:/bin/false
ntp:x:120:132::/home/ntp:/bin/false
timidity:x:122:135:TiMidity++ MIDI sequencer
service:/etc/timidity:/bin/false
zeroinst:x:121:134::/home/zeroinst:/bin/false
systemd-timesync:x:123:137:systemd Time
Synchronization:/run/systemd:/bin/false
systemd-network:x:124:138:systemd Network
Management:/run/systemd/netif:/bin/false
systemd-resolve:x:125:139:systemd Resolver:/run/systemd/resolve:/bin/false
systemd-bus-proxy:x:126:140:systemd Bus Proxy:/run/systemd:/bin/false
uuidd:x:100:101::/run/uuidd:/bin/false
_apt:x:127:65534::/nonexistent:/bin/false
sddm:x:128:142:Simple Desktop Display Manager:/var/lib/sddm:/bin/false
speech-dispatcher:x:129:29:Speech
Dispatcher:/var/run/speech-dispatcher:/bin/false
dhcpd:x:130:143::/var/run:/bin/false
roundup:x:999:999::/var/lib/roundup:
geoclue:x:131:144::/var/lib/geoclue:/bin/false
libvirt-qemu:x:64055:146:Libvirt Qemu:/var/lib/libvirt:/bin/false
libvirt-dnsmasq:x:132:145:Libvirt
Dnsmasq:/var/lib/libvirt/dnsmasq:/bin/false


---- /etc/group ----

root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:syslog,rdiez
tty:x:5:rdiez
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:rdiez
fax:x:21:
voice:x:22:
cdrom:x:24:rdiez
floppy:x:25:
tape:x:26:
sudo:x:27:rdiez
audio:x:29:pulse,timidity
dip:x:30:rdiez
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:
sasl:x:45:
plugdev:x:46:rdiez
staff:x:50:
games:x:60:
users:x:100:
nogroup:x:65534:
netdev:x:102:
crontab:x:103:
syslog:x:104:
fuse:x:105:rdiez
messagebus:x:106:
ssl-cert:x:107:
lpadmin:x:108:rdiez
scanner:x:109:saned
mlocate:x:110:
ssh:x:111:
utempter:x:112:
avahi-autoipd:x:113:
rtkit:x:114:
saned:x:115:
whoopsie:x:116:
avahi:x:117:
lightdm:x:118:
nopasswdlogin:x:119:
bluetooth:x:120:
colord:x:121:
pulse:x:122:
pulse-access:x:123:
rdiez:x:1000:
sambashare:x:124:rdiez
postfix:x:125:
postdrop:x:126:
dictd:x:127:
debian-spamd:x:128:
wireshark:x:129:rdiez
winbindd_priv:x:130:
davfs2:x:131:
ntp:x:132:
vboxusers:x:133:
timidity:x:135:
zeroinst:x:134:
systemd-journal:x:136:rdiez
systemd-timesync:x:137:
systemd-network:x:138:
systemd-resolve:x:139:
systemd-bus-proxy:x:140:
uuidd:x:101:
input:x:141:
sddm:x:142:
dhcpd:x:143:
roundup:x:999:
geoclue:x:144:
libvirtd:x:145:rdiez
kvm:x:146:


I would like to know who is setting up the group membership when logging
in, so that I can try to debug the problem there. "su - $USER" obviously
does it differently. I would have expected that the
method/library/whatever is shared (the same in both scenarios).

I found no complaint about logon or group problems in the usual syslog
oder dmesg.

Thanks in advance,
   rdiez


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

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

Ralf Mardorf-5
On Fri, 20 Jul 2018 15:09:25 +0200, R. Diez via ubuntu-users wrote:
>Yes, but how would I know that the package I just installed has
>changed group membership?

Synaptic displays the same messages, as you get when installing from
command line, sometimes you even need to confirm if a group get
added, resp. if a user is add to a group. Haphazardly removing a user
from groups and/or removing groups does not happen when using an
official Ubuntu flavour, without some strange third party stuff.

What was done is logged to /var/log/apt/term.log, e.g.

[weremouse@moonstudio ~]$ grep 'Adding new user' /var/log/apt/term.log
Adding new user `usbmux' (UID 112) with group `plugdev' ...
Adding new user `postfix' (UID 114) with group `postfix' ...
[weremouse@moonstudio ~]$ grep 'Adding group' /var/log/apt/term.log
Adding group `postfix' (GID 125) ...
Adding group `postdrop' (GID 126) ...

The command used is logged to /var/log/apt/term.log, e.g.

[weremouse@moonstudio ~]$ grep 2018-07-19 -A4 /var/log/apt/history.log
Start-Date: 2018-07-19  10:34:22
Commandline: apt full-upgrade -o APT::Keep-Downloaded-Packages=1 -o APT::Color=0
Requested-By: weremouse (1000)
Upgrade: snapd:amd64 (2.32.9, 2.33.1ubuntu2), python-apt-common:amd64 (1.1.0~beta1ubuntu0.16.04.1, 1.1.0~beta1ubuntu0.16.04.2), python-apt:amd64 (1.1.0~beta1ubuntu0.16.04.1, 1.1.0~beta1ubuntu0.16.04.2), python3-apt:amd64 (1.1.0~beta1ubuntu0.16.04.1, 1.1.0~beta1ubuntu0.16.04.2)
End-Date: 2018-07-19  10:34:32

Start-Date: 2018-07-19  18:06:20
Commandline: apt full-upgrade -o APT::Keep-Downloaded-Packages=1 -o APT::Color=0
Requested-By: weremouse (1000)
Upgrade: base-files:amd64 (9.4ubuntu4.6, 9.4ubuntu4.7)
End-Date: 2018-07-19  18:06:42


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

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

Liam Proven
In reply to this post by Ubuntu mailing list
On Fri, 20 Jul 2018 at 15:11, R. Diez via ubuntu-users
<[hidden email]> wrote:
>
> Yes, but how would I know that the package I just installed has changed
> group membership? Or should I assume the worst and restart my system
> after installing every package, like on Windows?

Well, something major like a whole new hypervisor, which installs its
own virtual network adaptors and everything, then yes!

--
Liam Proven - Profile: https://about.me/liamproven
Email: [hidden email] - Google Mail/Hangouts/Plus: [hidden email]
Twitter/Facebook/Flickr: lproven - Skype/LinkedIn: liamproven
UK: +44 7939-087884 - ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

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

Ralf Mardorf-5
In reply to this post by Ubuntu mailing list
Date: Fri, 20 Jul 2018 15:09:25 +0200
From: "R. Diez via ubuntu-users" <[hidden email]>
To: kauer...
Cc: "R. Diez" <[hidden email]>, [hidden email]
Subject: Output from 'groups' is suddently different to /etc/group

You shouldn't reply to Karl, I doubt that he likes this. Reply to the
mailing list only.


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

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

Karl Auer
In reply to this post by Ubuntu mailing list
On Fri, 2018-07-20 at 15:09 +0200, R. Diez wrote:
> I expected that everything would work straight away, but my user
> account was not immediately a member of those groups.

Yeah, I can see you might be surprised, but it's just one of those
things. The process that you are running in gets given the permissions
the system knows about when you log in. It can't be given extra
permissions afterwards, so you need to create a new process with the
new permissions. That's what you do with newgrp, by the way - it
actually creates a new shell with membership of the specified group.

> Yes, but how would I know that the package I just installed has
> changed group membership? Or should I assume the worst and restart my
> system after installing every package, like on Windows?

You don't need to reboot - you just need to log out and back in.

>  > 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?
>
> Yes. I have rebooted a few times in the meantime, and the problem is 
> still there.

So - even after rebooting and logging in again, when you run "groups"
it only shows you as a member of "rdiez", and not a member of all those
other groups? That is definitely NOT what should happen.

This sequence is what SHOULD happen. This is in a terminal window after
I have logged into X as "kauer":

kauer@kt:~$ sudo addgroup bippity
Adding group `bippity' (GID 1002) ...
Done.
kauer@kt:~$ groups
kauer adm dialout [...etc...]
kauer@kt:~$ groups kauer
kauer : kauer adm dialout [...etc...]
kauer@kt:~$ sudo usermod -a -G bippity kauer
kauer@kt:~$ groups
kauer adm dialout [...etc...]
kauer@kt:~$ groups kauer
kauer : kauer adm dialout [...etc...] bippity
kauer@kt:~$ newgrp bippity
kauer@kt:~$ groups
bippity adm dialout [...etc...] kauer
kauer@kt:~$ exit
exit
kauer@kt:~$ groups
kauer adm dialout [...etc...]
kauer@kt:~$ su - kauer
Password: 
kauer@kt:~$ groups
kauer adm dialout [...etc...] bippity
kauer@kt:~$ exit
logout
kauer@kt:~$ groups
kauer adm dialout [...etc...]
kauer@kt:~$ sudo delgroup bippity
Removing group `bippity' ...
Done.

> I would like to know who is setting up the group membership when
> logging in, so that I can try to debug the problem there.
>  "su - $USER" obviously does it differently.

Not really - the "-" just means do a full login.

This may be a silly question, but are you actually logging in as rdiez?
Into your window manager or a console?

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer ([hidden email])
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



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|

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

Karl Auer
On Sat, 2018-07-21 at 01:51 +1000, Karl Auer wrote:
> You don't need to reboot - you just need to log out and back in.

I should add that the standard updater will tell you if you do need to
restart your system.

Regards, K.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer ([hidden email])
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



--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users