LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-05-2009, 02:40 AM   #1
earlysame55
LQ Newbie
 
Registered: Feb 2008
Posts: 24

Rep: Reputation: 15
Central management


Dear all,

Please recommend some methods of:

-Deploy some files
-Execute some scripts as root

in few hundred servers. Just can't think of the best way of doing it. These are RHEL servers but we have different releases.

Thanks in advance.
 
Old 07-05-2009, 04:17 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
cluster ssh?
RedHat satellite server?
 
Old 07-05-2009, 06:37 AM   #3
earlysame55
LQ Newbie
 
Registered: Feb 2008
Posts: 24

Original Poster
Rep: Reputation: 15
Thanks Tinkster,

Clusterssh, should be the one. But any idea whether it could be scripted to execute some commands as root on a bunch. I cannot do a ssh key exchange for root.

Cheers!!
 
Old 07-05-2009, 08:11 AM   #4
cmdln
Member
 
Registered: Apr 2009
Location: Lawrence, KS
Distribution: Debian, Centos
Posts: 108
Blog Entries: 1

Rep: Reputation: 25
Quote:
Originally Posted by Tinkster View Post
cluster ssh?
RedHat satellite server?
There is also puppet, and cfengine.
 
Old 07-05-2009, 05:17 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by earlysame55 View Post
Thanks Tinkster,

Clusterssh, should be the one. But any idea whether it could be scripted to execute some commands as root on a bunch. I cannot do a ssh key exchange for root.

Cheers!!
You don't need to, as long as there's a remote user who can sudo
either w/o password, or with the same password on all clients.

The beauty of clusterssh is that you can do the "same interactive
command simultaneously on all machines" (of course, that's a danger,
too, if you fat-finger something and e.g. break networking on all
of them in one fell swoop)...



Cheers,
Tink
 
Old 07-05-2009, 11:10 PM   #6
earlysame55
LQ Newbie
 
Registered: Feb 2008
Posts: 24

Original Poster
Rep: Reputation: 15
Thanks cmdln and Tink,

Tink, I don't mind having the root password in a file and feed it into a script, delete it after the activity is done. When i configure sudo, that user will have access to run any script with the name given in the sudoers file. Security guys will not be happy with that isn't it?. What do you think?

All other apps life cfengine, puppet, etc. They need to have a agen running on the clients am i right?. Is it possible for me to push a script and execute them as root in these?.

cheers,
 
Old 07-05-2009, 11:46 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by earlysame55 View Post
Thanks cmdln and Tink,

Tink, I don't mind having the root password in a file and feed it into a script, delete it after the activity is done. When i configure sudo, that user will have access to run any script with the name given in the sudoers file.
Who said? That's certainly not how sudo is normally implemented.
sudo will execute the binary given with full path in sudoers file
if it happens to be in the search PATH of the user. He will not
be able to e.g. make a script called if-down-eth0 in his home and
run that using sudo.

Quote:
Originally Posted by earlysame55 View Post
Security guys will not be happy with that isn't it?. What do you think?
No, they wouldn't. Thank the Lord for coders with some brains, though.



Cheers,
Tink
 
Old 07-07-2009, 02:00 AM   #8
earlysame55
LQ Newbie
 
Registered: Feb 2008
Posts: 24

Original Poster
Rep: Reputation: 15
Tinkster,

Consider the follwoing:

user1 pluto=NOPASSWD : /home/user1/runitnow

The above line means user1 could run the /home/user1/runitnow without any password as root. Am i right ?
Then when this script exists, anyone can run any set of commands as /home/user1/runitnow the script without a problem. This is what i want to stop.

Cheers
 
Old 07-07-2009, 04:08 AM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Well... don't put scripts you need to run as root
in users homes, then. Simple as that. Put them
in a shared location like /usr/local/scripts, make
sure that neither the directory nor the script are
world-writable (and that the script is safe, e.g.
won't allow the user to interrupt it and end up on
a root shell; scripts and sudo are a bit of a mixed
bag .... ).



Cheers,
Tink
 
  


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
Central management of iptables mnejat Linux - Software 4 12-09-2008 10:04 AM
Linux Enterprise Distribution and Central Patch Management jpa9058 Linux - Enterprise 4 02-15-2008 08:16 AM
central syslog binary_0011 Linux - Newbie 1 06-13-2006 04:05 AM
central desktop management tools dukeinlondon Linux - Enterprise 1 08-31-2004 04:13 PM
Central Userid and Password management in Linux sx10 Linux - Networking 3 09-06-2003 03:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:15 PM.

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