In my CentOS 7 system (and other Linux flavors), I have noticed that there are two passwd files, /etc/passwd and /usr/bin/passwd. The former contains plaintext information about the users, groups, default shells, etc., whereas the latter is a binary (?) file that the "passwd" command invokes (as suggested by "which passwd").
These may be basic questions, but I have tried my luck with manuals and explanations on forums, albeit not fully clarifying my mental picture:
1) What is the purpose of each file, and why do we have both? 2) Are the two files related -- is the /usr/bin/passwd a binary version of the /etc/passwd that is constantly updated, for efficiency purposes? 3) What are the appropriate permissions on these files (I am getting a "passwd: Authentication token manipulation error" if I try to change the login password of a non-sudoer user from that user's account, which is what prompted this line of questioning to begin with).
Thanks for reading and I am looking forward to your thoughts!
$ passwd
) run$ man passwd
– Leasehold