Alphonse Ogulla wrote:
Hi all,
In an effort to run ppp as non root, I had to include my normal user id in the group 'dip' by directly editing /etc/group using vi. However, on saving and exiting /etc/group, I still could *not* access files owned by user root and available to users in group dip whilst using my normal uid. Just as I was about to give up, I decided to exit the shell and log in once again and to my amazement, I now could read files in /etc/ppp/peers directory whose permission is as follows:-

[EMAIL PROTECTED]:/etc/ppp$ ls -ld peers
drwxr-s---      2 root  dip             4096 Oct        2 12:06 peers

How does one explain this? Is the file /etc/group cached somewhere and updated only so often? How can the changes be forced to take effect immediately without exiting and logging in again?


Simply put, thats how unix works. On login, your groups are pulled from wherever nsswitch.conf points. Not everyone uses files (I use ldap), so caching can be desired.

If you dont want to logout and back in, you can always start a new shell with the newgrp command.

See man newgrp and the nscd docs (about caching)

HTH


--

Mental ([EMAIL PROTECTED])

"The Torah...  The Gospels...  The Koran...
Each claimed as the infallible word of GOD.
Misquoted, misinterpreted, misunderstood, and misapplied.
Maybe that's why he doesn't do any more interviews." - sinfest.net

CARPE NOCTEM, QUAM MINIMUM CREDULA POSTERO.

GPG public key: http://www.neverlight.com/pas/Mental.asc



Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to