LinuxQuestions.org
Review your favorite Linux distribution.
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-30-2012, 12:11 AM   #1
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Rep: Reputation: 36
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-30-2012 at 12:18 AM.
 
Old 03-30-2012, 12:36 AM   #2
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,362

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-30-2012, 12:55 AM   #3
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Original Poster
Rep: Reputation: 36
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 01:00 AM.
 
Old 04-02-2012, 01:58 AM   #4
pinga123
Member
 
Registered: Sep 2009
Posts: 684
Blog Entries: 2

Original Poster
Rep: Reputation: 36
Is the question too complex??
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 01:00 AM
Execution of a script -Urgent help needed?? anish2343 Linux - Software 4 11-06-2009 09:24 AM
Script Execution Help Needed. pinga123 Linux - Newbie 7 11-04-2009 02:31 AM
script execution yakoub Linux - Software 3 11-12-2006 02:26 AM
Script execution salmanucit Linux - Software 1 12-08-2005 09:51 AM


All times are GMT -5. The time now is 10:58 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration