I am trying to change my password as a non root user :
passwd
The data is updated in /etc/shadow, but checking the permission i get:
---------- 1 root root 6076 Jan 27 17:14 /etc/shadow
cat /etc/shadow
cat: /etc/shadow: Permission denied
Clearly there were no permissions on the file for anyone, even then the passwd command succeeds, and i am indirectly updating data to a non-previliged resource (shadow file)! So can anyone explain the mechanism that how the updation takes place in background ? Explanation with reference to the system calls will be very useful.
Aucun commentaire:
Enregistrer un commentaire