LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-29-2012, 11:11 PM   #1
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Rep: Reputation: 37
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.

Last edited by pinga123; 03-29-2012 at 11:18 PM.
 
Old 03-29-2012, 11:36 PM   #2
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Rep: Reputation: 135Reputation: 135
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 ???
 
Old 03-29-2012, 11:55 PM   #3
pinga123
Member
 
Registered: Sep 2009
Posts: 684

Original Poster
Blog Entries: 2

Rep: Reputation: 37
Quote:
Originally Posted by divyashree View Post
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 View Post
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.

Last edited by pinga123; 03-30-2012 at 12:00 AM.
 
Old 04-02-2012, 12:58 AM   #4
pinga123
Member
 
Registered: Sep 2009
Posts: 684

Original Poster
Blog Entries: 2

Rep: Reputation: 37
Is the question too complex??
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh execution help needed. pinga123 Linux - Newbie 4 03-24-2010 12:00 AM
Execution of a script -Urgent help needed?? anish2343 Linux - Software 4 11-06-2009 08:24 AM
Script Execution Help Needed. pinga123 Linux - Newbie 7 11-04-2009 01:31 AM
script execution yakoub Linux - Software 3 11-12-2006 01:26 AM
Script execution salmanucit Linux - Software 1 12-08-2005 08:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration