linux - Starting a service as userA from userB by using shell script -


is there way start service usera userb using shell script, usera , userb doesn't have root access. both users password protected.

the usuasual approach make use of 'sudo':

sudo -u userb service whatever start 

sudo available out of box on linux systems. can configure it, usera doesn't need enter password use above command.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -