There's an executable that's usually run by user A and writers in a directory only readable, writable, etc. by user A. Is it possible to allow user B in the same group to run the executable as user A so that it writes in the same directories, etc., without user B knowing the password of user A and without having access to root (i.e. cannot use visudo)?
Assuming your system has a working ssh server, you could add B's public key to
without having to know A's password.
The trouble is that this gives B full access to A's account. It's not quite as bad as giving B A's password.
There may be ways to set up ssh to permit B to run only certain commands, but I don't know what they are.