Hi all
I need to run a command that only a role user and root can run, I need to run that command remotely by script but the roles ask for a password.
Ex. from serverA with userA to serverB with userB:
userA can ssh serverB using userB without askink for a password.
user1 es a user tha can do su to roleuser
roleuser is a role that can execute /usr/sbin/savegroup
the matter is that when I try to do tha remotely it says : su: Sorry
how can i achieve my goals
Thanks for any help
I need to run a command that only a role user and root can run, I need to run that command remotely by script but the roles ask for a password.
Ex. from serverA with userA to serverB with userB:
userA can ssh serverB using userB without askink for a password.
Code:
ssh userB@serverB su roleuser -c "/usr/sbin/savegroup"
roleuser is a role that can execute /usr/sbin/savegroup
the matter is that when I try to do tha remotely it says : su: Sorry
how can i achieve my goals
Thanks for any help