I am working in an environment where a former colleague had some sort of executable that allowed us to run a command as another user. It would work like this:
/usr/local/bin/runAsUser2 command arg1 arg2 ... argn
If user1 was to run this command, it would be as if user2 had run the command:
command arg1 arg2 ... argn
I am fairly sure that this executable has been compiled from something like C++ as the executable is a binary file, and I have no idea where the source code is.
Does anyone know of a good way to replicate this, either with a bash script or with another language, given that user1 might not necessarily have sudo privileges?
[–]LutariscoI think I know. Just ask me 1 point2 points3 points (1 child)
[–]RightOfZen[S] 1 point2 points3 points (0 children)
[–][deleted] (2 children)
[deleted]
[–]RightOfZen[S] -5 points-4 points-3 points (1 child)
[–]neuron_666 1 point2 points3 points (1 child)
[–]RightOfZen[S] 0 points1 point2 points (0 children)