I have a weird problem in that my user (on Linux Mint 18.3 Sylvia
) is part of group docker
, which I verify by starting a terminal:
$ groups
me adm cdrom sudo dip plugdev lpadmin sambashare docker
Now, when I fire up tmux, and run the same command, suddenly my docker
membership disappears:
$ tmux
$ groups
me adm cdrom sudo dip plugdev lpadmin sambashare
The weird thing is, when I attempt to forcibly add my user to the group docker
when in tmux, it says I'm already in it!
$ sudo adduser me docker
The user `me' is already a member of `docker'.
I'm stumped -- why would being in tmux make a difference? For reference, I use fish
shell and this is my .tmux.conf
:
$ cat ~/config/.tmux.conf
new-session
set -g default-terminal "screen-256color"
set -g history-limit 10000
setw -g mode-keys vi
set-option -g default-shell /usr/bin/fish
set-option -g default-command /usr/bin/fish
EDIT
When I restarted my computer, everything worked again (both tmux
and "normal" shells showed my docker
membership). I'm still curious -- why did this happen?
groups
in both shell environments? Have you tried using other commands to show group membership, such as thegetent
orid
commands? – igal Mar 15 '18 at 12:34tmux attach
instead? – Andy Dalton Mar 15 '18 at 14:12tmux attach
, I just rantmux
and it's not aliased to anything as far as I can tell. – rxmnnxfpvg Mar 15 '18 at 15:11adduser
just edits a file (the/etc/groups
file. It does not add a process to a group. – ctrl-alt-delor Nov 29 '21 at 17:30