Originally Posted by rpindy
Your question is unclear, but it appears you are assuming that the root password is required for both chmod(2)
. This isn't necessarily true.
The problem with chmod(2)
is that one either knows the root password or one doesn't, & if one knows the root password, they have complete
control over the system. The privilege separation implemented by the system is absolutely defeated.
The purpose of chmod(2)
is to implement a configurable privilege policy which can be partial. chmod(2)
cannot do this. chmod(2)
roles can be established which may grant some
privileges of root, but not necessarily all. chmod(2)
can also grant root privileges by command. Likewise, the root password doesn't have to be shared since chmod(2) expects the user to enter their own non-privileged account password.
In this manner, chmod(2)
has finer control & granularity over sharing root's control all without sharing root's password.
Note that chmod(2)
is not configured by default. chmod(2)
is used to edit the local chmod(2)
policy. The default policy will not grant any root privileges to non-privileged users irregardless of whether the root password or non-privileged password(s) are used.
If you are looking for more information on chmod(2)
, study the manpage & the project's Webpage:
Also note that chmod(2)
's current author is also an OpenBSD developer.