My question is we are the normal user. We can't access the file which we didn't have the permission. We are executing the passwd command then how that command is able to access that file. We are executing the passwd command as a normal user. Can anyone explain to me?.
Asked
Active
Viewed 63 times
1
-
In short: The binary "passwd" has the setuid-bit set, which means, this program will run with the euid(effective user id) of the owner. Since the owner of passwd is root, the program runs with the euid of root and therefore can read and write from and to /etc/passwd – tkausl Dec 08 '14 at 11:34