I have written a c++ script that disables or enables users within a Solaris environment. This is done by calling the passwd through
sprintf(cmd, "/usr/bin/passwd -l %s", argv[1]);
However the script is not executed by root, but by another user. While the script executes the passwd changes are not done. Seems this is an issue with the user permission on passwd.
However it seems that only root can modify passwd. Is this true? Can something else be done? In the sense that passwd can be modified by other users?