Remote shell script
Hi Odigurus,
I am a newbee to ODI application and i am trying to run a script in Unix box2 from the Windows box.
Windows box - where ODI is installed
Unix box1 - where master repository is installed
Unix box2 - where the agent is installed and running, also where shell script needs to be executed from windows.
Physical agent test goes successful from the windows to unix box2.
When i try to execute the OS command from windows on to Unix box2 i get an error
"Cannot start execution"
java.lang.Execution:Error during Session launching: Error during Session Preparation : Oracle Data Integrator Timeout: connection Timeout: Connection URL
jdbc:oracle:thin:@Unix box1:<port>:<SID> and user <Mast REP>.
The above error tells me that it goes and connects to Unix Box1, is it because my ODIPARAMS.BAT files has those parameters, do i need to change those to point it to Unix Box2?
Can somebody please help me figure out what am i doing wrong here.
Thanks in advance for the help.
Hi,
Could you tell me how were you able to resolve he issue please? I too have the same scenario.
Your help in this is very much appreciated.
Thanks.
Similar Messages
-
How execute a remote shell script
Hi,
i'm in the instance A and i need to execute a shell script in the instance B.
It's possible?
my db is in 10.2.0.4
tnxdavyp74 wrote:
i'm in the instance A and i need to execute a shell script in the instance B.
It's possible?
my db is in 10.2.0.4Yes. Fairly easy - but there are functionality and security issues that must be considered.
Executing remote shell scripts are the easiest done using ssh and RSA key authentication. On server A, in the oracle user, you need to generate a RSA key for the account using "+ssh-keygen -t rsa+".
A private and public key will be generated in the +/home/oracle/.ssh+ directory. The contents of the public key needs to be copy and pasted into the oracle account on server B, into file +/home/oracle/.ssh/authorized_keys+.
Next you need to accept the signature of server B on server A (thiswill be stored in A in +/home/oracle/.ssh/known_hosts+ ). Simply ssh from A to B using command "+ssh oracle@B+" and accept the signature. The ssh attempt should work and not prompt for a password as RSA authentication is used (server B trust server A and accepts its private key as authentication).
Now you can execute the remote script (fully automated in the background) as follows: ssh oracle@B /software/scripts/foo.sh".
The next step is running this command from within the Oracle instance on A - this can be done using a custom Java stored proc (for accessing the command line) or via +DBMS_SCHEDULER+ as an external program. -
Execution of remote shell scripts(on AIX ) from Java Application
import java.io.BufferedReader;
import java.io.PrintWriter;
import java.io.InputStreamReader;
import java.io.IOException;
public class Test
public static void main(String args[])
throws Exception
String str = "xxxxxx";
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("rsh -l raman 172.16.12.10 ");
BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
PrintWriter pw = new PrintWriter(p.getOutputStream());
pw.println(str);
pw.println("ls -l");
pw.flush();
pw.close();
while ((str = br.readLine()) != null) {
System.out.println(str);
Hi All,
I want to login into the remote AIX server and want to execute the shell
scripts which are available at AIX server.Above program is not executing
kindly if u have any answer provide me..
regards
RamaTry JRexec library:
http://www.jcraft.com/jrexec/ -
How to execute a shell script which is present in remote machine using ODI
I have requirement of executing a batch (shell script) which is present in the remote machine.
i have an ODI agent in remote machine as well. I have created agent locally by using the remote machine IP and port.
I am able to test the agent successfully. But when i am executing the package using that agent it is failing with the following error
errorODI-1226: Step Execution of the Scenario REMOTE_DEMO version 001 fails after 1 attempt(s).
ODI-1241: Oracle Data Integrator tool execution fails.
Caused By: oracle.odi.runtime.agent.invocation.InvocationException: HTTP/1.1 500 ODI-1423: Warning connecting to Agent localagent: work repository WORKREP1 is not bound to the master
My Work Repository Name is : WORKREP1
Remote Work Repository Name is:WORKREP_LOCAL.
Could anyone please help me regarding this.
I can't download shell script and run it locally this needs to be run on that remote machine only.
Thanks
senthilkumarThis is the code.
1. we can declare types dynamically
2. Internal table dynamically
3. Select querry dynamically
just copy paste this code
Here is the code for your question
DATA:v_fieldname
TYPE fieldname,
l_PROG TYPE string,
v_mess TYPE string,
l_sid TYPE string,
wa_ddfields TYPE dntab.
DATA i_tab TYPE STANDARD TABLE OF string.
DATA:l_str TYPE string,
l_str1 TYPE string.
PARAMETERS matnr type marc-matnr.
end-of-SELECTION.
*build the subroutine pool
APPEND 'PROGRAM subpool.' TO i_tab.
APPEND `LOAD-OF-PROGRAM.` TO i_tab.
APPEND `DATA i_tab1 TYPE TABLE OF vbak.` TO i_tab.
APPEND `DATA l_rows TYPE i.` TO i_tab.
APPEND `select * into table i_tab1 from vbak.` To i_tab.
append 'DESCRIBE TABLE i_tab1 LINES l_rows.' to i_tab.
append 'Write : l_rows .' to i_tab.
GENERATE SUBROUTINE POOL i_tab NAME l_PROG
MESSAGE v_mess
SHORTDUMP-ID l_sid.
IF sy-subrc = 0.
PERFORM ('LOOP_AT_TAB') IN PROGRAM (l_PROG) IF FOUND.
ELSEIF sy-subrc = 4.
MESSAGE v_mess TYPE 'I'.
ELSEIF sy-subrc = 8.
MESSAGE l_sid TYPE 'I'.
ENDIF.
Edited by: vijay wankhade on Jan 1, 2009 5:34 PM
Edited by: vijay wankhade on Jan 1, 2009 5:34 PM -
Secure login to remote UNIX host and run a shell script
Hi I am new to JAVA. I want to login to remote UNIX host from my application secure login (SSH) and run a shell script reside that remote host. Can any one let me know the way how to do it. If possible provide the code example.
Runtime.exec with an ssh command (not really recommended).
Much better, an SSH API (JSch, which needs JZlib, from http://www.jcraft.com/ is a good one). -
How to Prompt for User/Pass Running Shell Script Remotely through ARD
So I finally got my Active Directory Script working! However, I realized that I'm not the only one going to be running this script and to have my user name and password in the script itself is beyond foolish. While I know it's possible just to have whoever's running the script to manually add their username and password, I'd prefer to have prompts to make things easier for the rest of my team.
Here's my current script. I've tested it on the machine I'm connecting to Active Directory and it works fine if you run it on the machine itself in terminal. However, I'm going to be doing this on about 150 machines and the whole point of the script is to do it remotely.
#! /bin/bash
MACNAME=$(scutil --get ComputerName)
read -p "User Name: " USER
read -p "Password for $USER: " PASS
dsconfigad -add "CORP.DOMAIN.NET" \
-username $USER \
-password $PASS \
-computer $MACNAME \
-mobile disable \
-mobileconfirm disable \
-localhome enable \
-useuncpath enable \
-shell /bin/bash \
-ou OU=Macs,CN=Computers,DC=corp,DC=DOMAIN,DC=net \
-force \
-localpassword "PASSWORD" \
-groups "GROUPS"
When I run the UNIX script through ARD to a machine, I get no prompts for USER or PASS. In fact, it gives me the following error "dsconfigad: Authentication server encountered an error while attempting the requested operation. (5202)" So it's not asking for a user name and password.
Is there any way to make a shell script prompt you for a User Name and Password when you're sending commands remotely through ARD? Or is there another way to do this?
Any suggestions would be greatly appreciated.
-rksBest solution is to create an account that is exclusive to binding machines. By doing this, you can embed the user name and password in the script. Heck, you can post it on your website. If the account is configured properly, it will only be able to create machine records in a defined container. If you are mixing Macs and PCs in your AD domain, I also recommend creating an isolated container for your Mac records. Now, the account has even less access rights as you can make it so it only has rights to the Mac container.
Otherwise, ARD does not prompt. You can play around with an expect script but the reality is that you are still embedding the credentials in the script so it really does not achieve what you want. ARD is not an interactive shell scripting tool. It is more a fire and forget.
Reid
Apple Consultants Network
Apple Professional Services
Author "Mavericks Server – Foundation Services" :: Exclusively available in Apple's iBooks Store -
Power Shell Script for Check Remote machinces are live or not
I have required a Power Shell Script for Check multiple Remote machines are live or not.Please guide me
This will do it.
http://gallery.technet.microsoft.com/Ping-IP-Adress-Range-d90ce82d
¯\_(ツ)_/¯ -
Power shell script to install apps in remote server
Hello Masters ,
Tried pssession , invoke command to run a PS1 script in remote server
script wil install a exe file and run a script to install features
no luck no luck no luck
please help !Your code looks fine. Your main problem is that you aren't providing anyone with any useful information about what's going wrong. Is there an error message? Do chickens fly out of the computer speakers instead of your script running as
you expect it to?
My gut instinct tells me that psremoting isn't enabled, or a security configuration isn't working. Use the following links or try psexec instead.
http://technet.microsoft.com/en-us/library/dd315349.aspx
http://technet.microsoft.com/en-us/library/dd347642.aspx
I hope this post has helped! -
CSS 11500 - Keepalive script to remotely execute a shell script on a server
Hi!
I've been trying to connect the dots but so far I've got nothing close to what I need - based on Cisco's documentation.
I was wondering if it was possible for the CSS switch to connect to a server in order to execute a shell script such as "/opt/whatever/script.sh", which would return a specific value like "OK". Anything different than OK would mean a dead service, and the affected service would be taken out of business (no load balancing play).
Could someone confirm whether it can be done?
Many thanks!!
LeoLeo,
you could try to use CSS script to telnet to the server, and execute the command.
But that would be ugly.
What you should do, is put your script inside a cgi webpage and let the CSS call the webpage.
Your webserver will then run the script that you want and return to result inside and HTML page to the CSS which can then decide on the status of the server.
If you do not have a web server, you should create a small tcp server to listen to CSS request and again send the result of the script back to css.
Gilles. -
Error while trying to execute a unix shell script from java program
Hi
I have written a program to execute a unix shell script in a remote machine. I am using J2ssh libraries to estabilish the session connection with the remote box.The program is successfully able to connect and authenticate with the box.
The runtime .exec() is been implemented to execute the shell script.I have given below the code snippet.
try {
File file_location = new File("/usr/bin/");
String file_location1 = "/opt/app/Hyperion/scripts/daily";
String a_mib_name = "test.sh";
String cmd[] = new String[] {"/usr/bin/bash", file_location1, a_mib_name};
Runtime rtime = Runtime.getRuntime();
Process p = rtime.exec(cmd, null, file_location);
System.out.println( "Connected to the server1" );
BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = br.readLine();
while(line !=null)
System.out.println(line);
line = br.readLine();
br.close();
p.getErrorStream ().close ();
p.getOutputStream().close();
int retVal = p.waitFor();
System.out.println("wait " + retVal);
//session.executeCommand("ls");
catch (IOException ex) {
I get an error message
Connected to the server
java.io.IOException: Cannot run program "/usr/bin/bash" (in directory "\usr\bin"
): CreateProcess error=3, The system cannot find the path specified
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at SftpConnect.main(SftpConnect.java:143)
Caused by: java.io.IOException: CreateProcess error=3, The system cannot find th
e path specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
I am sure of the file path where the bash.sh and test.sh are located.
Am i missing something? Any help would be greatly appreciated.
Thanks
SenthilHi, I am using a simple program to connect to a RMI server and execute shell script. I use the Runtime.exec aommand to do the same.
The script is sh /tmp/pub/alka/test.sh /tmp/pub/alka/abc/xyz/ul ul
The script when run from the server, gives no errors. But when ran using rthe above method in java, gives errors as follows,
Mycode:
String command = "/bin/sh /tmp/pub/alka/test.sh /tmp/pub/alka/abc/xyz/ul ul";
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec(command);
int exitVal = proc.exitValue();
System.out.println("Process exitValue: " + exitVal);
java.io.IOException: CreateProcess: /bin/sh /tmp/pub/alka/test.sh /tmp/pub/alka/abc/xyz/ul ul error=3
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
at java.lang.ProcessBuilder.start(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at DecryptTest.main(DecryptTest.java:18)
Can anyone please help -
How do I create a package that will install a shell script?
From various sources I have made this shell script which creates a hidden admin user, starts ard and sshd.
I would like to make this a package which will run on a machine on first boot. (I'm using deploystudio to deploy ML)
It creates a hidden user called testuser1 with the password of password1
[code]# Create user record in directory services
dscl . -create /Users/testuser1
dscl . -create /Users/testuser1 RealName "testuser1"
dscl . -create /Users/testuser1 UniqueID 401
dscl . -create /Users/testuser1 PrimaryGroupID 20
dscl . -create /Users/testuser1 UserShell /bin/bash
dscl . -passwd /Users/testuser1 "password1"
# Set up a hidden home folder
dscl . -create /Users/testuser1 NFSHomeDirectory /var/testuser1
cp -R /System/Library/User\ Template/English.lproj /var/testuser1
chown -R testuser1:staff /var/testuser1
# Grant admin & ARD rights
dseditgroup -o edit -t user -a testuser1 admin
/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/ki ckstart -activate -configure -access -on -users testuser1 -privs -all -restart -agent
# Tell loginwindow not to show the user
defaults write /Library/Preferences/com.apple.loginwindow Hide500Users -bool TRUE
# Alternate: defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array testuser1
# start remote login ssh
systemsetup -setremotelogin on[/code]
I'm using package maker but it keeps failing. If I add it from somewhere like my Documents dir it says it will give my username the permissions instead of root. If I add it from / and make root the owner packagemaker errors probably because my user doesn't have the rights to it. I want it to copy somewhere then maybe have another script that copies to the same location and does an rm to remove the previous script so no admin details are left on the machineBasicilly I want to roll out an image that will work with all models of macs which are comaptible with Mountain Lion. To do so I'm using deploystudio with the installESD.dmg as the image. This way it will install the relevant drivers for each model of mac. So the image should work whether it's a mac pro tower/mac mini/macbook.
Upon completetion deploystudio lets you run packages so I would like the script above to be in a package. I don't want it even to copy the script anywhere I would just like it to run the .sh file I've made if thats possible?
I'm just not sure what steps to take with packagemaker, I've never used it before.
But yeah the ultimate goal is: upon installation completetion setup hidden admin user that will have ssh and ard access. -
STEPS TAKEN:
Logged into Mac for first time today.
Noticed a new individual file in Directory Library ".a.text". (Settings disply hidden system file/folders)
File contained only the text "--purge".
Meta data on file directed source to bash process run @ startup.
Attached History command output.
Disabled ARD for now.
SETTINGS:
All Sharing was Off.
Firewall was set to Block All Incoming Connections.
Home network with no other active users at time.
Upgraded to Mavs 10.9.2 last night.
Do not use any file sharing or remote access into Mac.
The SSH host attempts were my old Amazon EC2 instances.
Appears to start bitcoin app and few databases.
Worth noting I've been having tons of various issues last few months.
Thanks.
<POB> My CommandLine prompts. XXXX on locals.
XXXXXX:~ Administrator$ export HISTTIMEFORMAT='%F %T '
XXXXXX:~ Administrator$ history
<POB> OUTPUT
1 2014-02-27 17:23:35 rm -rf ~/.Trash/*
2 2014-02-27 17:23:35 cd
3 2014-02-27 17:23:35 .
4 2014-02-27 17:23:35 ./
5 2014-02-27 17:23:35 cd
6 2014-02-27 17:23:35 lib
7 2014-02-27 17:23:35 cd/
8 2014-02-27 17:23:35
9 2014-02-27 17:23:35 ls
10 2014-02-27 17:23:35 cd downloads
11 2014-02-27 17:23:35 ls downloads
12 2014-02-27 17:23:35 ls Downloads
13 2014-02-27 17:23:35 find / -nouser -ls
14 2014-02-27 17:23:35 find /~nouser -ls
15 2014-02-27 17:23:35 ls
16 2014-02-27 17:23:35 ls /library
17 2014-02-27 17:23:35 /LaunchAgents
18 2014-02-27 17:23:35 ls /LaunchAgents
19 2014-02-27 17:23:35 ls /Automator
20 2014-02-27 17:23:35 ls /KeyChains
21 2014-02-27 17:23:35 sha
22 2014-02-27 17:23:35 toop
23 2014-02-27 17:23:35 top
24 2014-02-27 17:23:35 dscl . -list /Users UniqueID
25 2014-02-27 17:23:35 $ dscl -plist . readall /users
26 2014-02-27 17:23:35 $ dscl . readall /users
27 2014-02-27 17:23:35 $ dscl . readall /503
28 2014-02-27 17:23:35 ls/Users
29 2014-02-27 17:23:35 - dscacheutil -q group
30 2014-02-27 17:23:35 cd
31 2014-02-27 17:23:35 cd.
32 2014-02-27 17:23:35 cd .
33 2014-02-27 17:23:35 ls
34 2014-02-27 17:23:35 ifconfig
35 2014-02-27 17:23:35 ifconfig
36 2014-02-27 17:23:35 ifconfig
37 2014-02-27 17:23:35 config helper
38 2014-02-27 17:23:35 config
39 2014-02-27 17:23:35 ls
40 2014-02-27 17:23:35 ssh awsXXXX
41 2014-02-27 17:23:35 defaults write com.google.Keystone.Agent checkInterval 0
42 2014-02-27 17:23:35 exit
43 2014-02-27 17:23:35 exit
44 2014-02-27 17:23:35 /var/log/secure.log
45 2014-02-27 17:23:35 ssh awsXXXXXX
46 2014-02-27 17:23:35 exit
47 2014-02-27 17:23:35 kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}'
48 2014-02-27 17:23:35 sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|edu\.mit|org\.(amavis|apache|cups|isc|ntp|postfi x|x)/{print $3}'
49 2014-02-27 17:23:35 launchctl list | sed 1d | awk '!/0x|com\.apple|edu\.mit|org\.(x|openbsd)/{print $3}'
50 2014-02-27 17:23:35 ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta} * L*/Fonts 2> /dev/null
51 2014-02-27 17:23:35 osascript -e 'tell application "System Events" to get name of every login item' 2> /dev/null
52 2014-02-27 17:23:35 top
53 2014-02-27 17:23:35 ps
54 2014-02-27 17:23:35 top
55 2014-02-27 17:23:35 top
56 2014-02-27 17:23:35 top
57 2014-02-27 17:23:35 sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/k ickstart -agent -stop
58 2014-02-27 17:23:35 man who
59 2014-02-27 17:23:35 who
60 2014-02-27 17:23:35 whoami
61 2014-02-27 17:23:35 ps -aux
62 2014-02-27 17:23:35 ps
63 2014-02-27 17:23:35 top
64 2014-02-27 17:23:35 ps -eo pid,etime
65 2014-02-27 17:23:35 top
66 ??ps aux | less
67 2014-02-27 17:23:35 pstree
68 2014-02-27 17:23:35 ps -eo euser,ruser,suser,fuser,f,comm,label
69 2014-02-27 17:23:35 pgrep
70 2014-02-27 17:23:35 pgrep remote
71 2014-02-27 17:23:35 apt-get install htop
72 2014-02-27 17:23:35 htop
73 2014-02-27 17:23:35 netstat -tulpn | grep :80
74 2014-02-27 17:23:35 ls -l /proc/635/exe
75 2014-02-27 17:23:35 swapon -a
76 2014-02-27 17:23:35 ma ps
77 2014-02-27 17:23:35 man ps
78 2014-02-27 17:23:35 man ps
79 2014-02-27 17:23:35 ps -a
80 2014-02-27 17:23:35 ps -A
81 2014-02-27 17:23:35 whoami
82 2014-02-27 17:23:35 ps -f
83 2014-02-27 17:23:35 ps -G
84 2014-02-27 17:23:35 ps -g
85 2014-02-27 17:23:35 ps -T
86 2014-02-27 17:23:35 ps-t
87 2014-02-27 17:23:35 ps -v
88 2014-02-27 17:23:35 ps start
89 2014-02-27 17:23:35 top
90 2014-02-27 17:23:35 ps
91 2014-02-27 17:23:35 users
92 2014-02-27 17:23:35 last
93 2014-02-27 17:23:35 ls /var/log/wtmp*
94 2014-02-27 17:23:35 last -f /var/log/wtmp.1
95 2014-02-27 17:23:35 last -f /var/log/wtmp.0
96 2014-02-27 17:23:35 ~/.bash_history
97 2014-02-27 17:23:35 cat ~/.bash_history
98 2014-02-27 17:23:35 ls /Automator
99 2014-02-27 17:23:35 cat Automator
100 2014-02-27 17:23:35 open ~/.bash_history
101 2014-02-27 17:23:35 dscl . readall /users
102 2014-02-27 17:23:35 ls/library
103 2014-02-27 17:23:35 cd/library
104 2014-02-27 17:23:35 cd..
105 2014-02-27 17:23:35 cd
106 2014-02-27 17:23:35 ls
107 2014-02-27 17:23:35 cd Library
108 2014-02-27 17:23:35 cd/Library
109 2014-02-27 17:23:35 ls/Automator
110 2014-02-27 17:23:35 toop
111 2014-02-27 17:23:35 top
112 2014-02-27 17:23:35 ifconfig
113 2014-02-27 17:23:35 config helper
114 2014-02-27 17:23:35 config
115 2014-02-27 17:23:35 top
116 2014-02-27 17:23:35 ps -a
117 2014-02-27 17:23:35 ps -A
118 2014-02-27 17:23:35 ps -aux
119 2014-02-27 17:23:35 ps
120 2014-02-27 17:23:35 getprocessforpid(677)
121 2014-02-27 17:23:35 man ps
122 2014-02-27 17:23:35 ps -U
123 2014-02-27 17:23:35 ps -u
124 2014-02-27 17:23:35 GetProcessPID(494)
125 2014-02-27 17:23:35 GetProcessPID() q
126 2014-02-27 17:23:35 GetProcessPID494
127 2014-02-27 17:23:35 GetProcessPID 494
128 2014-02-27 17:23:35 netstat -b
129 2014-02-27 17:23:35 top
130 2014-02-27 17:23:35 top
131 2014-02-27 17:23:35 top
132 2014-02-27 17:23:35 netstat -a
133 2014-02-27 17:23:35 netstat -a | grep vnc | grep ESTABLISHED
134 2014-02-27 17:23:35 top
135 2014-02-27 17:23:35 netstat -a
136 2014-02-27 17:23:35 top
137 2014-02-27 17:23:35 top
138 2014-02-27 17:23:35 netstat -a
139 2014-02-27 17:23:35 ps -aux
140 2014-02-27 17:23:35 netstat -a | grep vnc | grep ESTABLISHED
141 2014-02-27 17:23:35 ps -aux
142 2014-02-27 17:23:35 ps -A
143 2014-02-27 17:23:35 ps -A
144 2014-02-27 17:23:35 netstat -a | grep vnc | grep ESTABLISHED
145 2014-02-27 17:23:35 netstat -a
146 2014-02-27 17:23:35 top
147 2014-02-27 17:23:35 top
148 2014-02-27 17:23:35 netstat -a
149 2014-02-27 17:23:35 netstat -a
150 2014-02-27 17:23:35 netstat -a
151 2014-02-27 17:23:35 q
152 2014-02-27 17:23:35 top
153 2014-02-27 17:23:35 top
154 2014-02-27 17:23:35 sudo tmutil disablelocal
155 2014-02-27 17:23:35 exit
156 2014-02-27 17:23:35 top
157 2014-02-27 17:23:35 top
158 2014-02-27 17:23:35 top
159 2014-02-27 17:23:35 top
160 2014-02-27 17:23:35 top
161 2014-02-27 17:23:35 top
162 2014-02-27 17:23:35 neststat -n
163 2014-02-27 17:23:35 netstat -n
164 2014-02-27 17:23:35 netstat -n
165 2014-02-27 17:23:35 ls
166 2014-02-27 17:23:35 lsaf
167 2014-02-27 17:23:35 cd ..
168 2014-02-27 17:23:35 cd ..
169 2014-02-27 17:23:35 cd ..
170 2014-02-27 17:23:35 cd ..
171 2014-02-27 17:23:35 ls
172 2014-02-27 17:23:35 top
173 2014-02-27 17:23:35 netstat
174 2014-02-27 17:23:35 dscl . list/users
175 2014-02-27 17:23:35 cd ~
176 2014-02-27 17:23:35 dscl . list/users
177 2014-02-27 17:23:35 dscl . list /users
178 2014-02-27 17:23:35 dscl . list /groups
179 2014-02-27 17:23:35 dscl . readall /users
180 2014-02-27 17:23:35 netstat
181 2014-02-27 17:23:35 netstat
182 2014-02-27 17:23:35 whoami
183 2014-02-27 17:23:35 ls
184 2014-02-27 17:23:35 cd ..
185 2014-02-27 17:23:35 cd ..
186 2014-02-27 17:23:35 cd .
187 2014-02-27 17:23:35 cd ..
188 2014-02-27 17:23:35 ls
189 2014-02-27 17:23:35 tree
190 2014-02-27 17:23:35 cd Users
191 2014-02-27 17:23:35 ls
192 2014-02-27 17:23:35 cd Administrator
193 2014-02-27 17:23:35 ls
194 2014-02-27 17:23:35 cd ..
195 2014-02-27 17:23:35 cd ..
196 2014-02-27 17:23:35 cd ..
197 2014-02-27 17:23:35 ls
198 2014-02-27 17:23:35 cd Users
199 2014-02-27 17:23:35 ls
200 2014-02-27 17:23:35 cd Adminstrator
201 2014-02-27 17:23:35 cd Administrator
202 2014-02-27 17:23:35 ls
203 2014-02-27 17:23:35 cd Downloads
204 2014-02-27 17:23:35 ls
205 2014-02-27 17:23:35 exit
206 2014-02-27 17:23:35 whoami
207 2014-02-27 17:23:35 ls
208 2014-02-27 17:23:35 ls
209 2014-02-27 17:23:35 cd Library
210 2014-02-27 17:23:35 ls
211 2014-02-27 17:23:35 cd Application Support
212 2014-02-27 17:23:35 ls
213 2014-02-27 17:23:35 cd ..
214 2014-02-27 17:23:35 ls
215 2014-02-27 17:23:35 cd ..
216 2014-02-27 17:23:35 ls
217 2014-02-27 17:23:35 cd pXXXXXXXX
218 2014-02-27 17:23:35 ls
219 2014-02-27 17:23:35 cd Library
220 2014-02-27 17:23:35 whoami
221 2014-02-27 17:23:35 sudo - Adminsitrator
222 2014-02-27 17:23:35 ls
223 2014-02-27 17:23:35 ls
224 2014-02-27 17:23:35 sudo -
225 2014-02-27 17:23:35 more /etc/hosts
226 2014-02-27 17:23:35 scc ver
227 2014-02-27 17:23:35 scc numprofiles
228 2014-02-27 17:23:35 netstat -an |find /i "listening"
229 2014-02-27 17:23:35 netstat
230 2014-02-27 17:23:35 top
231 2014-02-27 17:23:35 kextstat -kl | awk '!/com\.apple/{printf "%s %s\n", $6, $7}'
232 2014-02-27 17:23:35 sudo launchctl list | sed 1d | awk '!/0x|com\.(apple|openssh|vix)|edu\.mit|org\.(amavis|apache|cups|isc|ntp|postfi x|x)/{print $3}'
233 2014-02-27 17:23:35 launchctl list | sed 1d | awk '!/0x|com\.apple|edu\.mit|org\.(x|openbsd)/{print $3}'
234 2014-02-27 17:23:35 ls -1A /e*/mach* {,/}L*/{Ad,Compon,Ex,Fram,In,Keyb,La,Mail/Bu,P*P,Priv,Qu,Scripti,Servi,Spo,Sta} * L*/Fonts 2> /dev/null
235 2014-02-27 17:23:35 osascript -e 'tell application "System Events" to get name of every login item' 2> /dev/null
236 2014-02-27 17:23:35 osascript -e 'tell application "System Events" to get name of every login item' 2> /dev/null
237 2014-02-27 17:23:35 top
238 2014-02-27 17:23:35 dscacheutil -flushcache
239 2014-02-27 17:23:35 sudo killall -HUP mDNSResponder
240 2014-02-27 17:23:35 top
241 2014-02-27 17:23:35 ./bitcoin-qt
242 2014-02-27 17:23:35 cd $home
243 2014-02-27 17:23:35 ls
244 2014-02-27 17:23:35 cd ..
245 2014-02-27 17:23:35 cd ..
246 2014-02-27 17:23:35 cd ..
247 2014-02-27 17:23:35 ls
248 2014-02-27 17:23:35 cd Applications
249 2014-02-27 17:23:35 ls
250 2014-02-27 17:23:35 ./bitcoin-qt.app
251 2014-02-27 17:23:35 top
252 2014-02-27 17:23:35 ps -420
253 2014-02-27 17:23:35 ps -9541
254 2014-02-27 17:23:35 top
255 2014-02-27 17:23:35 /Applications/Postgres93.app/Contents/MacOS/bin/psql ; exit;
256 2014-02-27 17:23:35 /Applications/Postgres93.app/Contents/MacOS/bin/psql ; exit;
257 2014-02-27 17:23:35 top
258 2014-02-27 17:23:35 ps -a (2077)
259 2014-02-27 17:23:35 ps -a2077
260 2014-02-27 17:23:35 sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
261 2014-02-27 17:23:35 top
262 2014-02-27 17:23:35 on run
263 2014-02-27 17:23:35 do shell script "osascript -e 'tell app \"ARDAgent\" to do shell script \"say quack\"'"
264 2014-02-27 17:23:35 end run
265 2014-02-27 17:23:35 ls -ls /System/Library/Filesystems/AppleShare/check_afp.app/Contents/MacOS/check_afp 2
266 2014-02-27 17:23:35 sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
<POB> ENDI'm extremely unclear on exactly what's happening. You mention something about a script running at startup in your subject, but then never mention that again. What's going on there? Where are you finding that script?
That script would suggest someone playing a joke on you, by making your computer say "quack" every time you start up. That's not indicative of malware.
On the other hand, a hidden file as you describe is a common malware trick, though I'm not sure why it would only contain "--purge" - that isn't a complete command, as far as I know, and the purge command isn't likely to be used for malicious purposes anyway.
Still, you do have some indication that you're using Bitcoin-related apps, and there has been some Bitcoin malware that has appeared recently. See:
New CoinThief malware discovered
Note that the post on MacRumors that you refer to in your second post is almost six years old, and references a vulnerability that was closed later in 2008. It's completely irrelevant to any modern system. -
Passing parameters in a shell shel script
Hi everybody,
I am working on a task which gets report on every remote database.
I created a small database: ‘REPORTS_DB’ and I created 6 'sql' scripts on that database. While executing the first script, it calls the other 5 different 'sql' scripts. All these 5 sql scripts use a '@db_link' (hard coded) and gets that database's report to the database: REPORT_DB.
It is working good. But,
We have 42 databases and I have to get reports of all the 42 databases. Since it is not efficient to create 42 sets of sql scripts, I want to make it automated.
I know (but I don't know HOW) I can pass a parameter (database link name) while running the first script (which calls the other 5 scripts), so that the parameter replaces the @db_link in all the 5 scripts and gets the report of the related (@db_link) database.
Could somebody send me a sample shell script to do this task?
OR, is there any way to do this task without using shell script ?
(BTW, we are using korn shell on sun Solaris)
Thanks in advance.
- JTHi everybody,
I posted same question earlier for UNIX/shell script and rec'd one response. Thanks to Bob.
But the requirement has been changed and now my mgr wants the same task using PL/SQL. Could somebody help me ?
Question again....
I am working on a task which gets report on every remote database.
I created a small database: ‘REPORTS_DB’ and I created 6 'sql' scripts on that database. While executing the first script, it calls the other 5 different 'sql' scripts. All these 5 sql scripts use a '@db_link' (hard coded) and gets that database's report to the database: REPORT_DB.
It is working well. But,
We have 42 databases and I have to get reports of all the 42 databases. Since it is not efficient to create 42 sets of sql scripts, I want to make it automated.
I know (but I don't know HOW) I can pass a parameter (database link name) while running the first script (which calls the other 5 scripts), so that the parameter replaces the @db_link in all the 5 scripts and gets the report of the related (@db_link) database.
Could somebody tell me how to do this task using SQL and PL/SQL ?
OR
send me a sample PL/SQL script to do this task?
Sorry for the inconvenience and thanks in advance.
- JT -
I would like some assistance with writing a simple shell script using the telnet command. I would like to simply execute my script and have it telnet to a device, login and perform commands specific to the equipment.
Once I get past the login I got the rest. I am requesting assistance with establishing the actual telnet session sending the escape character to awake the device, wait for the login, send login, wait for the password send password. etc.. I can then execute the commands needed at this point.
Thank you,
Todd Matherne
[email protected]Hi,
I've got a script for telnet, maybe you'll try this:
#!/usr/bin/perl
sub connect
use Net::Telnet ();
#testscript for remote login and datatransfair.
print("IP of Router you wannt to connect to: \n");
$ip = <STDIN>;
#gets IP from standardinput.
open(TAB, ">$ip");
$tel = new Net::Telnet(Errmode => "return", Timeout => 20);
#generate telnet object.
$tel->open($ip);
#connect to $ip
$tel->login(Name => "User", Password => "",);
#login
$tel->cmd("more off");
#more off.
@table=$tel->cmd("ip routes");
I Hope you can use this
Cheers
bolligur -
Hello All,
I would like to transfer a file from one system to another system.
so i haven written shell script with ftp command as follows.
ftp -i 10.14.12.1<< END
cd C:\Temp
put $datafile
ascii
quit
But i am getting error.
Please let me know the sysntax followed by me is correct or thar remote system is down,
Many thanks,
Kumar.The ftp(1) command is not well-suited for scripting. Instead us the curl(1) tool:
curl -T myfile ftp://ftp.some.where/down/in/this/dir/
for example.
$ man 1 curl
for more details.
Maybe you are looking for
-
Error in running DME - No advice number
Hi, Seeking experts help as I ran into some issues in DME. got to do a immediate fix. When I ran DME (RFFOUC_T ) for the Pymt method P ( Bnk Trasfers). First I got a popup to provide printer details - DME accompanying sheet - Bnk ID When I insert out
-
Help with Places no longer working in iPhoto 9
Since an update about a month ago, Places no longer works with iPhoto 9 version 8.1.2 (424). Where GPS data is present, the map tries to open but all I get is a dull green screen where the map should be. My Nikon View software Geotag works with the s
-
I have an external hard drive from seagate. Tonight I decided to give it a try and add a new partition to it so I could have a bootable version of mountain lion in it it just in case of emergency and no internet. After creating the partition, disk ut
-
Toshiba external hard drive is not seen by my time capsule
I am trying to connect an external hard drive to my time capsule, I am doing this with other hard drives and it work perfectly, but I just got a toshiba 1,5 tb drive with external power supply and my time capsule simply ignore it, it is not shown in
-
OK... my apple tv worked great. everything was as it should be... after i figured out which ports to open on my router. Anyway, now my itunes library wont show up. EVERYTHING else is working. My screen saver is my moblile me account pics, it work