Logging out and logging back in do not fix this problem. Rebooting does not fix this problem.
NOTE: Please do not mark this question as a duplicate, I'm aware of this question: I added a user to a group, but group permissions on files still have no effect and have tried these things multiple times.
I've added my user account to some groups using usermod -aG
, however I am not able to access any resources associated with that group. I can fix this using sudo su - $USER
, however this only lasts for my current terminal session.
Example terminal session:
$ id
uid=1008(erik) gid=1009(erik) groups=1009(erik)
$ echo $USER
erik
$ sudo su - $USER
[sudo] password for erik:
$ id
uid=1008(erik) gid=1009(erik) groups=1009(erik),27(sudo),100(users),999(docker),1001(rvm)
I have to do this every time I open a terminal. Rebooting does not fix this.
Is there any way I get get all the groups assigned to me when I login?
Distro: Ubuntu 16.04 x64 User Catscrash has reported the same issue with Ubuntu 18.04
This seems to only happen when I open a terminal in my desktop. If I ssh to the machine or switch to a TTY (ctrl+alt+F2 for example), then I get the correct groups.
$ id
uid=1008(erik) gid=1009(erik) groups=1009(erik)
$ ssh localhost
erik@localhost's password:
Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-131-generic x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
0 packages can be updated.
0 updates are security updates.
----------------------------------------------------------------
Ubuntu 16.04.2 LTS built 2017-04-20
----------------------------------------------------------------
Last login: Thu Jul 26 09:18:38 2018 from ::1
$ id
uid=1008(erik) gid=1009(erik) groups=1009(erik),27(sudo),100(users),999(docker),1001(rvm)
$
Current using XFCE as my desktop environment. I also have KDE installed.
I've tried both possible values for starting the terminal as a login shell - neither makes any difference.
I've tried disabling apparmor via sudo systemctl disable apparmor
and rebooted. After reboot, since I have docker installed, it still loads apparmor with the docker profile. So additionally I tried disabling docker: sudo systemctl disable docker
and then rebooting.
After this, the output of apparmor_status is:
$ sudo apparmor_status
apparmor module is loaded.
0 profiles are loaded.
0 profiles are in enforce mode.
0 profiles are in complain mode.
0 processes have profiles defined.
0 processes are in enforce mode.
0 processes are in complain mode.
0 processes are unconfined but have a profile defined.
so, that means it's loaded but not doing anything?
Either way, it doesn't resolve the issue. I still cannot access any resource that I should have group permissions for.
Any other ideas?
sudo su -
. It drives me nuts because I know I've gotten this to work on other machiens... – The Vermilion Wizard Jul 24 '18 at 20:27