Mailinglist Archive: opensuse (946 mails)

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

...and then Paul Groves said...
% Hi,


% I need to be able to run a command as another user.

Only root can su to an account without a password, and there is no -p
flag as you hypothesized, so su is probably out. Youu don't want that
anyway, though; sudo is worlds better.

The logical question is "why can't you provide sudo access for Joe to run
as Bob?". Do you have root on this system or know who does? What's
standing in your way?

Finally, if bob has a normal shell rather than a network-login-blocked
shell of some sort, another alternative might be to make an ssh connection
with a key rather than a password and kick off the command that way.
If you don't have to worry about display variables or a few other bits,
then that can be a very simple answer.


David T-G

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

< Previous Next >
List Navigation