Applying new user/group permissions in VNC session
-
- Posts: 13
- Joined: 2023/09/08 16:00:39
Applying new user/group permissions in VNC session
I noticed that when the user and group permissions of a certain user are updated, the new settings do not apply for the current VNC session. Hence, it is required to restart the VNC session.
Is there a way to apply the new settings without restarting the VNC session?
Is there a way to apply the new settings without restarting the VNC session?
Re: Applying new user/group permissions in VNC session
What do you mean by "user and group permissions of a certain user are updated"?
-
- Posts: 13
- Joined: 2023/09/08 16:00:39
Re: Applying new user/group permissions in VNC session
Hi,
I encountered this issue when I used usermod command to add a user to an existing group.
I encountered this issue when I used usermod command to add a user to an existing group.
Re: Applying new user/group permissions in VNC session
I still have to guess that you mean adding/removing user to groups.
When you log in, the authentication process creates a list of groups that your account is member of.
That list is passed to every process that is started during the session. In other words, the memberships
are not checked from source all the time.
The easiest solution is to log out and then login; create new session, where updated list is in use.
However, there is command newgrp that you can run. It will start a new bash (in that terminal),
where the group (given as parameter to the command) will not only be added to the list of groups,
but also is set as the primary group (for that bash process and commands run from it).
When you log in, the authentication process creates a list of groups that your account is member of.
That list is passed to every process that is started during the session. In other words, the memberships
are not checked from source all the time.
The easiest solution is to log out and then login; create new session, where updated list is in use.
However, there is command newgrp that you can run. It will start a new bash (in that terminal),
where the group (given as parameter to the command) will not only be added to the list of groups,
but also is set as the primary group (for that bash process and commands run from it).
Re: Applying new user/group permissions in VNC session
But newgrp will only affect the single bash prompt in your VNC session that you run it in. It will not do that for the rest of the things running under VNC on that desktop. To do that you have to logout and back in again.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: Applying new user/group permissions in VNC session
True. While one can start some GUI applications, like editors, browser, and nautilus from bash, that does not cover everything.
Furthermore, lets say you have:
and you create files:
Then you do newgrp work that creates a session:
where:
It may, or may not be desirable that the gid of the created files is 'work' in that shell and not 'jane' as if you had logged in again.
Overall, the "change of permissions" shouldn't be a frequent event, should it?
Furthermore, lets say you have:
Code: Select all
$ id
uid=1000(jane) gid=1000(jane) groups=1000(jane)
Code: Select all
$ touch foo
$ ls -l foo
-rw-rw-r--. 1 jane jane 0 31. 1. 11:55 foo
Code: Select all
$ id
uid=1000(jane) gid=1001(work) groups=1001(work),1000(jane)
Code: Select all
$ touch bar
$ ls -l bar
-rw-rw-r--. 1 jane work 0 31. 1. 11:55 bar
Overall, the "change of permissions" shouldn't be a frequent event, should it?
-
- Posts: 13
- Joined: 2023/09/08 16:00:39
Re: Applying new user/group permissions in VNC session
Hi all,
Thank you for your clarification.
As I understand, every process that a user runs over VNC inherits the permission set when the VNC session is started. That is why permissions of a process are not updated while the VNC process is up and running.
Thank you for your clarification.
As I understand, every process that a user runs over VNC inherits the permission set when the VNC session is started. That is why permissions of a process are not updated while the VNC process is up and running.