Folks,
We are trying to develop a utility program (ChangePassword) which allows users to change their password automatically by executing:
exp_spawnl("passwd", "username")
The passwd command requires root privileges in order to change password of another user, however we like to run our utility program using setuid so that the user executing the program does not have to be root but receives the root privileges from the executable file.
So we execute:
sudo chown root ChangePassword
sudo chmod 6755 ChangePassword
But from some reason this does not work, when we execute ChangePassword the passwd command spawned by exp_spawnl does not inherit the root privileges.
Any ideas ?