LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Script execution help needed. (https://www.linuxquestions.org/questions/linux-newbie-8/script-execution-help-needed-937203/)

pinga123 03-29-2012 11:11 PM

Script execution help needed.
 
I m using multiple scripts which are running on one master computer(server) and fetching records from another computers(client).

For example.

Machine A running scripts to execute code on Client machines say Machine B ,Machine C and Machine D
respectively.
Output of the script is then emailed to user.

I have added ssh keygen so that password less login and command execution can be done on client machine.


However All of the above was done using root user and now i want to use a normal user account to do the same.

What are the steps involved if i do this?

One way to do this is to create a simple user @ server end and add all the script in sudoer files against that account.
This will solve the problem of permission denied error @ server end.
But what about client end.
There are lot of different commands which are executed @ client end.Do i need to add all of them in sudoer file against the user name.
and then run
Code:

ssh -ttq sudo <command>
is there any other better alternative to this?

Hope my question is clear.

divyashree 03-29-2012 11:36 PM

Do you use root user also at client side to execute the script ??

If so first try by coping the client machine script to normal user account and change the ownership of script.

And check whether it needs any root privileges for execution ???

pinga123 03-29-2012 11:55 PM

Quote:

Originally Posted by divyashree (Post 4640304)
Do you use root user also at client side to execute the script ??

Yes,But the script executes at server end and only command by means of ssh are executed with root privileges at client side.

There are lot of commands that are executed using ssh password less login at client end.
Does it mean i have to add them all to sudoer files if they all needs root access.

Quote:

Originally Posted by divyashree (Post 4640304)
If so first try by coping the client machine script to normal user account and change the ownership of script.
And check whether it needs any root privileges for execution ???

You mean command right?They do need root privileges.

pinga123 04-02-2012 12:58 AM

Is the question too complex??


All times are GMT -5. The time now is 04:47 PM.