DHCP request at system startup via shell script
Hi all,
I administer about 120 macs and a couple of weeks ago the network admin changed the ipv4 network and the dhcp-leases, -ranges.
My macs do not get an ip address when they start up.
It takes about one minute until the request is succeeded.
I am about to write a shell script that starts a dhcp request over the network.
I want to use the same command that the network system pref (Renew DHCP Lease) uses.
I read the bootpd, xinetd, lookupd manual but I am not sure wich one is the correct deamon to use.
Someone can help?
Thanks in advance
Cheers Thorsten
Seen the ipconfig yet?
http://developer.apple.com/documentation/Darwin/Reference/ManPages/man8/ipconfig .8.html
Two ways to renew a lease in Terminal, adjust your enNUMBER accordingly...
sudo ipconfig set en0 BOOTP;sudo ipconfig set en0 DHCP
sudo ifconfig en1 down;sudo ifconfig en1 up
Similar Messages
-
Launchd won't send email via shell script
I'm trying to send an email via shell script. e.g. my shell script is something like this:
#!/bin/sh
echo testing | mail -s 'this is a test' [email protected]
My launchdaemon runs the script: /usr/local/scripts/testscript.sh
I know the script is working, because I added some debugging (I added a line: echo is this working and sure enough, "is this working" is showing up in the console) but the email part kicks off an error message about 30 seconds later: Stray process with PGID equal to this dead job: PID ### PPID 1 sendmail
The script works when I run it with a cron job. But why wouldn't it work as a launchd item? And why is it I'm only having problems with the email segment of my scripts? I've tried other scripts and they all seem to work fine.There are no errors reported. I'm looking in /var/log/mail.log.
-
BI Admin Tool - Setting connection pool via shell script - Is it possible?
Hi,
Here's the problem I am trying to solve.
I am using a J2EE application that uses OBIEE for reporting.
The *.rpd file is installed at a particular location when our J2EE product is installed.
I then copy the *.rpd file to the BI home on a different server using a shell script.
The shell script that deploys the *.rpd file does the following:
1. Shuts down BI processes that are running
2. Deletes the old *.rpd file
3. Copies the new *.rpd file
4. Starts all BI processes
I am happy with the way we have automated this process, but would like to take it one step further.
The *.rpd file does not have the connection pool hard-coded in it. And we want to keep it that way.
What we would like to do is - pass the connection pool parameters to the shell script (that is used for *.rpd's deployment) and have it automatically update the *.rpd file. Is it possible to do this at all? How do we go about accomplishing this?
Or in other words - Is there a way to update the connection pools WITHOUT hard-coding it in the *.rpd file or WITHOUT using the BI Administration Tool.
Currently, we manually update the connection pools in the Physical Layer using the Oracle BI Administration Tool.
The version of BI Administration Tool being used is 10.1.3.3.1 installed on a Microsoft Windows XP Professional SP2 machine. The BI Server itself is running on an Oracle Enterprise Linux 4.0 box.
Do let me know if you need more information that would help answer this question.
Thank you.Thank you - fiston and Gagan.
I am going with fiston's solution - since it is easier to implement. I am on the QA team and the automated deployment is to lessen QA's deployment time.
While one of our developer's said that she prefer's Gagan's solution - it would be over-kill to make changes to the application's schema for the said purpose.
I will further make another post as to whether or not the automated deployment worked for us. -
Mounting Samba (Windows) drive via shell script
This question is for the seasoned Unix geeks among us.
I have a `zsh' script (read bash/ksh on steriods) at work that prepares my build environment prior to running an Ant script (read `make' for Java). The Ant script actually looks for code that is on a shared directory, usually mounted over Samba (cifs). If I forget to manually mount this drive (Finder > Go > Connect to Server...) then the script will bomb.
Now, I have tried various attempts at using the `mount_*' commands, but can't seem to get them to actually mount a drive. I'm fairly certain that `mount_smbfs' is what I want to use, but calling it doesn't seem to work as the `man' file suggests. Naturally, I want to add this mounting call to my environment setup prior to calling the build script.
Any tips from a seasoned Unix hack out there? Thanks!
TimThere is a unix forum here which would be a better place for this question, but I believe the problem is you haven't created a mount point in the Volumes folder which would then be the path argument.
Here is the examples from the mount_afp
EXAMPLES
The following example illustrates how to mount the afp volume server.com-
pany.com/volumename/ at the mount point /Volumes/mntpnt:
mkdir /Volumes/mntpnt
mount_afp afp://username:[email protected]/volumename/ /Volumes/mntpnt
This example shows the proper url to use to mount the volume guestVolume
from the afp server myserver as guest:
mkdir /Volumes/guest
mount_afp "afp://;AUTH=No%20User%20Authent@myserver/guestVolume" /Volumes/guest
This example shows the proper url to use to mount the volume myVolume
from the afp server myserver using Kerberos authentication:
mkdir /Volumes/myVolume
mount_afp "afp://;AUTH=Client%20Krb%20v2@myserver/myVolume" /Volumes/myVolume -
Run a sudo command on system startup via Applescript?
Hey, I'm trying to hide the Spotlight icon on my menu bar using the sudo command shown here:
http://osxdaily.com/2011/12/12/hide-spotlight-menu-icon-mac-os-x-lion/
It works fine, but when I reboot my Mac (I tend to turn it off at night since it has a habit of waking from sleep by itself) the icon has re-appeared, and I need to run the command again.
I'd ideally like to write an Applescript to run on launch to execute the two commands (which also requires entering my password), but I've not been successful, I get various errors talking about authentication and such.
Is there an easier way to get this icon permanently hidden? I use Alfred, so while I make use of the Spotlight index, I never touch the magnifying glass icon, and I like to keep a clean menu bar!You don't need applescript. What you need to create is a LaunchAgent. Lingon (available through the App Store) can help you write it. But, there are other sources that can show you how to write the raw file and put it in the LaunchAgents folder, like here: http://www.devdaily.com/mac-os-x/launchd-examples-launchd-plist-file-examples-ma c
-
Access System Resources using Java Applet via Java Script
Hello
I can access my Applet public methods (and this methods access system resources) via Java Script if I do the following: System.setSecurityManager(null);However, I'm making this post because I don't like this solution.
Supposedly, setting the SM to null is like making the Applet (which is signed and was accepted by the user via a prompt from the browser) behave like a normal Java program that has no restrictions. (http://java.sun.com/docs/books/tutorial/essential/environment/security.html, second paragraph)
However, this feels like a workaround of something that is supposed to be there (the SM).
Also, if I make the methods invocation from inside the applet (using swing buttons and textboxes for example) I can use the standard SM without no problems.
From my readings, the problem regarding Java Script invocation, comes from the fact that the Java Script is not a secure (not signed) source (because you can invoke public methods the way you wish from it i guess) on the contrary to the applet methods invoked by the buttons.
Possible solutions I found in the web range from using the public static Object doPrivileged(PrivilegedAction action) method or imaginative things like creating new threads on the public method that call the private methods that access the system resources (supposedly because the new thread runs under the safe environment of the applet)
I almost got a glimpse of hope with this post http://forums.sun.com/thread.jspa?threadID=5325271&tstart=0
However, none of these solutions worked, the only results were with the setResourceManager(null)So, any one can contribute with a solution for this? Should I keep trying to find a solution other then the one I already have?
Regards
Cad1. yes
2. yes
Note for 2. the converter will run the applet with SUN jre for sure if the user has IE.
IE will use the ActiveX technology to run the applet (as with Macromedia Flash).
For Netscape I am not sure, but I would think Netsape will use the plug in provided by
SUN.
Note for SUN jre 1.3. If this applet is to be used within a company that uses a proxy with
ntlm authentication the 1.3 applet cannot connect (to the Internet) through this proxy since
ntlm athentication is supported since j2re1.4.2_03. There is one version before that but
that one will pop up a window asking for the user's domain account and password wich
is both lame and crappy.
As for the IE settings, IE has a default setting that askes users the "do you trust"
queston for AciveX controls within the Internet securety zone (tools -> internet options
-> security).
Sincy anybody can make ActiveX controls (allso sign them) a user that has a problem
to find the "no" button will sooner or later install a malicuous ActiveX control (spy ware
or a virus).
If this user's desktop is within your company's network it will cause serious harm.
This is why most company's disable this by changing the default internet expolorer
settings. Since I assume you are writhing this applet to be used by a company I allso
assumed that company has someone to maintain the desktops. In that case I
assume that person would want to control the security within the SUN jre instead of
letting the user deside what to trust and what not. -
Using launchctl command within a shell script
I have successfully installed two daemons, and I would like to be able to disable and enable them via shell scripts, called by the daemons themselves. Here is my first shell script:
#!/bin/sh
# Testing for presence of a CODEBOY file
if [ -e "/Volumes/CODEBOY/Change.txt" ]
then
osascript '/Users/praxisii/Library/Scripts/MacScript.scpt'
launchctl unload -w '/Users/praxisii/Library/LaunchDaemons/WaitDaemon.plist'
launchctl load -w '/Users/praxisii/Library/LaunchDaemons/RunDaemon.plist'
fi
The daemon works just fine, running the background, calling this script, which is waiting for me to plug in my flash drive (entitled CODEBOY). When the flash is plugged in, the applescript is called, and the first launchctl command is executed, which disables the WaitDaemon. As advertised, the .plist file is re-written with the Disabled key set to true. The next line (which is supposed to enable the RunDaemon) is never executed.
Similarly, if the launchctl line is placed before the osascript line, the applescript is never called. It is as if the shell ignores everything after a single launchctl command, which it will execute.
Any ideas or comments?Gary:
Thank you for the link to the TN2083. Long, but very informative.
I appreciate all the other comments on this thread. I am an amateur AppleScript/UNIX scripter, and any opportunity to learn more is much appreciated.
I have completely re-worked my original launchd agent system for automatic processing of a file on a flash drive. Here is the .plist file that I now use:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>RunOSAscript</string>
<key>LowPriorityIO</key>
<true/>
<key>Program</key>
<string>/usr/bin/osascript</string>
<key>ProgramArguments</key>
<array>
<string>osascript</string>
<string>/Users/casdvm/Desktop/AutoFlash.scpt</string>
</array>
<key>RunAtLoad</key>
<false/>
<key>ServiceDescription</key>
<string>Runs Applescript directly</string>
<key>StandardOutPath</key>
<string>/Users/casdvm/Desktop/AutoFlashLog.txt</string>
<key>StartInterval</key>
<integer>25</integer>
</dict>
</plist>
The AutoFlash.scpt is an Applescript that simply uses the Finder to check for the presence of a specific file on the flash drive. If it is there, and a certain script property has a value of 2, then it runs the AppleScript that processes the desired file on the flash drive. Once that is done, the script property is set to 0 (to prevent the processing from happening over and over again.). Once the flash drive is removed, the script property is set back to 2 in anticipation of the next time the flash drive is plugged in.
It is much simpler than the two agents I was messing with beforehand. I did indeed discover that this .plist needs to be saved in the LaunchAgents folder of my user Library (thanks again for pointing that out, Gary).
The only problem that I have involves the continuous calling of the Applescript from the launchd agent. As you can see from my .plist file, that AppleScript is called every 25 seconds. I tried setting it up using the OnDemand key, but I kept receiving a re-spooling error of some sort (I don't recall exactly; my notes are sketchy on that phase of testing), so I just decided to have it go every 25 seconds. It really doesn't matter, since I can leave the flash drive plugged in all day anyway, and it only processes the desired file once.
Thanks again for all the commentary and discussion; I am grateful for the assistance.
Craig Smith -
Oracle declare function in shell script
Please tell me oracle declare function now able to run in shell script?
I am calling in shell script like @/myscript.sql it is not working properly, reset update and other oracle command is working fine in shell script.I am running below code.
#!/bin/sh
sqlplus system/manager@prod_db <<ENDOFSQL
update apps.fnd_concurrent_queues set node_name = 'host1', target_node ='host1' where node_name='host3';
update apps.fnd_concurrent_queues set node_name = 'host2', target_node ='host2' where node_name='host4';
commit;
DECLARE
VALUE BOOLEAN;
l_node_id number;
BEGIN
select node_id into l_node_id from fnd_nodes where NODE_NAME = 'host5';
VALUE := fnd_profile.save ('NODE_TRUST_LEVEL', 3, 'SERVER',l_node_id,null,null);
END;
ENDOFSQL
Below ERROR i am getting after running above code via shell script with oracle user
SQL>
0 rows updated.
SQL>
0 rows updated.
SQL>
Commit complete.
SQL> SQL> DECLARE
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at line 5 -
Hi
My ext 4tb (2x2TB raid 0) failed this week. HDD 2 failed to be more specific.
Ive managed to get some functionality back but cant get into the file structure
I was hoping to see if I could get in via shell script. Nopt used this before but given I could loose 3tb of movies and music I will try anything...
Anyone have any gidance on using shell script to access an external network drive?
I can ftp to the drive.
SiHi Friend,
Can you check this link will help you some extend : [FTP open file;
Regards, -
How does one run a shell script at system startup?
Hi,
I am trying to unmount my Boot Camp hard drive on my MacBook Pro. Now what I could do is create an automator action, save it as an application and then put it into my user´s login items. I am wondering though - shouldnt it be possible to run a simple shell script command like +diskutil unmount /Volumes/"Boot Camp"+ sometime during the startup process?
Or to put it another way - is there an easy way to do this or do i have to create an manage a daemon through launchd ?
Your help is very much appreciated.sorry I forgot to mention that there is a bug in Lingon which creates a plist incorrectly if you enter your script explicitly on line 2. At least I haven't been able to make it work. A workaround I always use it the following.
Save your script as a *plain text* file from your favorite text editor. change the extension to .sh and make the file unix executable. Now, when you ccreate a launch daemon using Lingon, enter the path to that file instead of the script itself.
This always works for me.
Good luck! -
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. -
Shell Script for Startup and Shutdown the database
Hi,
i want Shell Script for Startup and Shutdown the database in Solaries.
could any one can hep me where i can get this script. or send to me to [email protected]
Thanks & Regards,
Gangi reddySHUTDOWN
SHUTDOWN ABORT]
Shuts down a currently running Oracle instance, optionally closing and dismounting a database.
Terms
Refer to the following list for a description of each term or clause:
ABORT
Proceeds with the fastest possible shutdown of the database without waiting for calls to complete or users to disconnect.
Uncommitted transactions are not rolled back. Client SQL statements currently being processed are terminated. All users currently connected to the database are implicitly disconnected and the next database startup will require instance recovery.
You must use this option if a background process terminates abnormally.
IMMEDIATE
Does not wait for current calls to complete or users to disconnect from the database.
Further connects are prohibited. The database is closed and dismounted. The instance is shutdown and no instance recovery is required on the next database startup.
NORMAL
NORMAL is the default option which waits for users to disconnect from the database.
Further connects are prohibited. The database is closed and dismounted. The instance is shutdown and no instance recovery is required on the next database startup.
TRANSACTIONAL [LOCAL]
Performs a planned shutdown of an instance while allowing active transactions to complete first. It prevents clients from losing work without requiring all users to log off.
No client can start a new transaction on this instance. Attempting to start a new transaction results in disconnection. After completion of all transactions, any client still connected to the instance is disconnected. Now the instance shuts down just as it would if a SHUTDOWN IMMEDIATE statement was submitted. The next startup of the database will not require any instance recovery procedures.
The LOCAL mode specifies a transactional shutdown on the local instance only, so that it only waits on local transactions to complete, not all transactions. This is useful, for example, for scheduled outage maintenance.
Usage
SHUTDOWN with no arguments is equivalent to SHUTDOWN NORMAL.
You must be connected to a database as SYSOPER, or SYSDBA. You cannot connect via a multi-threaded server. For more information about connecting to a database, see the CONNECT command earlier in this chapter.
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/ch13.htm#1013607
Joel Pérez -
Sqlplus in Shell Script with startup pfile
I have the following entry in my Korn shell script:
${ORACLE_HOME}/bin/sqlplus -s /nolog << EOSQL >> ${PR_LOG}
connect / as sysdba
whenever sqlerror exit sql.sqlcode;
startup pfile "/u01/app/oracle/admin/${ORA_SID}/pfile/spfile${ORA_SID}.ora";
EOSQL
When I execute the script I get the following errors:
LRM-00123: invalid character 0 found in the input file
ORA-01078: failure in processing system parameters
I've isolated the problem to the 4th line. When I change it to simply "startup", everything works. I did try changing the quotes to ` and ', but those didn't work. I even explicitly listed the ORA_SID, and I'm still getting the same error messages.
Any ideas how I can resolve my problem with the 4th line? All help is appreciated.and yes I want to start the database with the spfile.
If I just use "startup", everything is fine; and I can start the database with the spfile, because I have a symbolic link under $ORACLE_HOME/dbs to point to my actual spfile location - /u01/app/oracle/admin/salsa/pfile/So... what's the problem ? Just use "startup", if I'm not wrong you'd use the same spfile.
To use that syntax you should create a file with a line like this
spfile=<path of spfile>
and start as
startup pfile='<path of that file>' -
I need AD Health status via Power Shell script
Dear All,
I need AD Health power shell script and it has to be sent via email as report on daily basis
Can anyone help on this?
Thanks,
PushparajI found below script which can be used, but i would request run these scirpts in test environment before executing in production.
http://fearthemonkey.co.uk/using-powershell-to-perform-dc-health-checks/
http://www.wolffhaven45.com/blog/powershell/automate-some-active-directory-health-checks-via-powershell/
You can also search for scripts in below repository.
http://gallery.technet.microsoft.com/
Also, for scripting related request, its better to post the thread in dedicated scripting/powershell forum.
http://social.technet.microsoft.com/Forums/scriptcenter/en-US/home?forum=ITCG
Awinish Vishwakarma - MVP
My Blog: awinish.wordpress.com
Disclaimer This posting is provided AS-IS with no warranties/guarantees and confers no rights. -
How to detect a system crash (shell script)
what is the easiest way to find out if the system has previously crashed or been powered off without a clean shutdown?
i am looking for a way to be used in a unix shell script. is there e.g. a specific text i can look for in a specific logfile?
a panic.log might not be enough because in case of power failure the system will not have time to write to that logfile.
any help is greatly appreciated.The shutdown codes are not documented anywhere that I know of. I've seen these mentioned, but I don't know whether they're all accurate.
-128: Battery or UPS dead (?)
-62: PMU did not detect heartbeat (PPC Xserve)
-60: Thermal (?)
0: Low power
3: Forced shutdown
5: User requested restart or shutdown
Maybe you are looking for
-
"Cannot connect to itunes store" error when trying to update or downloading a new app
It's been like this for weeks and im really tired now. I tried all the fixed like reset networks, change the time, resetting my phone but none of them worked. Can someone please help me :(
-
Hello to all! i am interested to make a query that will display the following data from oinv Invoice No Document Status Posting Date Due Date Customer/Vendor Name Document Total from payment means Payment Date Total does anyone know which is the tabl
-
Allocation table for consignment PO
Friends, We are creating allocation table . When doing the follow on document, We want to create PO with consignment Item category. What are the settings to accompolish this. Article is created with consignment control 1 and source of suppy D Consi
-
Hello, I have recently brought up my two old solaris 8 boxes and want to bring them all up to data, but it seems that i can no longer get the patch files as i don't have the Sun Contract Number? I have logged into https://support.oracle.com/CSP/ui/fl
-
How can one actually see their keychain passwords?
Is it possible to acually see your keychain passwords?