I have not yet found the answer to this question, hence asking it here.
The /etc/passwd and /etc/shadow files have read-only permissions for
users (/etc/shadow is read-only for root too!). Still using the passwd
command users are able to change their passwords (which means changing
the corresponding entries in /etc/shadow). I understand that both these
files are not accessed directly by the commands but by some API's
(google gives this much info !!)... so as far as I understand, the API
must be running with SU perms.... but still users are able to change
only their own passwds (and not others)...
can someone explain exactly what goes on.....? maybe shed some more
light on this... :)
Thanks in anticipation,
Priyam.
-=-=-
... "When you say "I wrote a program that crashed Windows", people just
stare at you blankly and say "Hey, I got those with the system, *for
free*"."
- Linus Torvalds