On ubuntu server, I've noticed more than once now that after adding a user to a group that user doesn't have group permissions until I reboot the system. For example:
User 'hudson' needs permission to read directory 'root:shadow /etc/shadow' So I add hudson to the shadow group. hudson still cannot read. So, I 'sudo shutdown -h -r now' and when the system comes up again user hudson can read.
Is a reboot required or is there a better way to get permissions applied after adding the user to the group?
-
When adding a user to a new group, the user must log out and log back in for it to take affect. While a reboot will accomplish that, it should not be required.
Michael Prescott : How do I logout a user that was created by aptitude when installing a package?womble : What package creates the `hudson` user?packs : As Justin answered, try stopping and starting the service.From packs -
Adding a user to a group does not effect currently logged in users.
In the case of a daemon, you need to restart it for new groups to be applied.
Furthermore, restarting the daemon using an option in the daemon itself will not work as that will inherit the current environment.
The easiest way to get it to work is to fully stop the daemon and start it again, as in..
/etc/init.d/foo stop ; /etc/init.d/foo start
From Justin
0 comments:
Post a Comment