gdha / adhocr Goto Github PK
View Code? Open in Web Editor NEWAdhocr is tool to run commands on multiple systems simultaneously using expect or ssh
Adhocr is tool to run commands on multiple systems simultaneously using expect or ssh
While we running adhocr
with –sudo
option is not working as expected on redhat 6.
Please find the below output.
Script which I executed ./adhocr -f list1 -sudo -u kdharmar -x -c "echo passwd -S root"
[kdharmar@itsausyl00013 ~]$ id
uid=26754(kdharmar) gid=100(users) groups=100(users),8649(se)
[kdharmar@itsausyl00013 ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.3 (Santiago)
[kdharmar@itsausyl00013 ~]$
kdharmar@itsausyl00001:~> cat ./adhocr-2013-12-12.091606.output
BEGIN HOST ##### ITSAUSYL00013 #####
spawn ssh -q -o ConnectTimeout=10 -o StrictHostKeyChecking=no kdharmar@ITSAUSYL00013
kdharmar@itsausyl00013's password:
Last login: Thu Dec 12 09:14:06 2013 from itsausyl00001
[kdharmar@itsausyl00013 ~]$
[kdharmar@itsausyl00013 ~]$ sudo su -
You are about to be granted root shell access. By continuing, you agree to
the following requirements:
- Your access to the root shell must have been authorized by being a member
of one of the groups that grants this access.
- You may not use the privileges granted by the use of the root shell to
grant elevated privileges to any other user or any other account.
- If you have been granted root shell access on a temporary basis, you MUST
exit the root shell as soon as you complete your actions.
[sudo] password for kdharmar:
Sorry, try again.
[sudo] password for kdharmar:
Sorry, try again.
[sudo] password for kdharmar:
Sorry, try again.
sudo: 3 incorrect password attempts
[kdharmar@itsausyl00013 ~]$
Execution time on host ITSAUSYL00013 was 21.2878188419342041 seconds
END HOST ##### ITSAUSYL00013 #####
--------------------------------------------------------------------------------
adhocr -p 20 -t 60 -f systems/list -up -x -c "/home/gdhaese/bin/HPUX_Add_SIM_Certificate.sh bin/HPUX_Add_SIM_Certificate.sh
$ more ./output/adhocr-2014-10-02.115118.output
BEGIN HOST ##### system #####
spawn ssh -o ConnectTimeout=10 -o StrictHostKeyChecking=no gdhaese@system /home/gdhaese/bin/HPUX_Add_SIM_Certificate
.sh bin/HPUX_Add_SIM_Certificate.sh
*** ERROR: New SIM Server is not pingable (bin/HPUX_Add_SIM_Certificate.sh)
Bij sudo gebruik voert het adhocr script volgende uit:
send \"sudo su -\\r\" ;
sleep 1 ;
set timeout 8 ;
expect {
\"*?assword:*\" {
send -- \"\$password\\r\" ;
###expect -re \"\[\$@#:>] $\" ;
expect -re \"\[\$@#:>](.*)\" ;
}
}
De sudo password prompt op mijn lab systeem is echter: “[sudo] password for admin_tw:”
Lab systeem is itsustdclnx91, Red Hat 6.3
Ik heb om te testen even de : weggehaald in de verwachte password prompt. Misschien wel iets om na te gaan hoe het op andere systemen staat om deze eventueel in adhocr aan te passen.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.