Mailinglist Archive: opensuse (946 mails)

< Previous Next >
Re: [opensuse] Run command as another user


On 29/09/17 10:28, David T-G wrote:
Josef, et al --

...and then Josef Fortier said...
%
...
% You can write a dirt simple c program to call the hard coded script
% path. That wrapper can be setuid to root.
% It's not elegant (and I'd use sudo myself) but it's worth noting.

True, but that presumes that the guy has root access, at which point
we're back to either being root to run su (ew) without a password or, as
you suggest, using sudo. I get the impression that the OP is a normal
user who isn't going to get help from root.
correct.

I like the idea of the c program though. I could pass in the username, password and command using getopt

So then the question becomes how do I run a command using another user's credentials in c / c++? can system() do this?


HAND

:-D


--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse+owner@xxxxxxxxxxxx

< Previous Next >
List Navigation
Follow Ups