Monday, June 7, 2010

How to Setup PostgreSQL database on Solaris 10

By default PostgreSQL comes with solaris 10. To check if PostgreSQL is installed in your Solaris instance you can use the following command:

$ svcs "*postgres*"
STATE STIME FMRI
disabled Feb_16 svc:/application/database/postgresql:version_81
disabled 16:11:25 svc:/application/database/postgresql:version_82

If you don't see any PosgreSQL instance in your Solaris box then proceed and install the following packages (the list may actually change over time):
* SUNWpostgr
* SUNWpostgr-contrib
* SUNWpostgr-devel
* SUNWpostgr-docs
* SUNWpostgr-jdbc
* SUNWpostgr-libs
* SUNWpostgr-pl
* SUNWpostgr-server
* SUNWpostgr-server-data
* SUNWpostgr-tcl


After installation, SMF services should be listed by (the output may depend on the actual PostgreSQL version you installed):

$ svcs "*postgres*"
STATE STIME FMRI
disabled Feb_16 svc:/application/database/postgresql:version_81
disabled 16:11:25 svc:/application/database/postgresql:version_82




PostgreSQL on Solaris uses RBAC to give users permissions over the database instance. When you install Solaris' PostgreSQL packages an RBAC role is setup for you:


[/etc/passwd]
postgres:x:90:90:PostgreSQL Reserved UID:/:/usr/bin/pfksh

This user is setup as an RBAC role in /etc/user_attr file:

[/etc/user_attr]
postgres::::type=role;profiles=Postgres Administration,All

Permission for the Postgres Administration profiles are setup in the /etc/security/exec_attr file:

[/etc/security/exec_attr]
Postgres Administration:solaris:cmd:::/usr/postgres/8.2/bin/initdb:uid=postgres
Postgres Administration:solaris:cmd:::/usr/postgres/8.2/bin/ipcclean:uid=postgres
Postgres Administration:solaris:cmd:::/usr/postgres/8.2/bin/pg_controldata:uid=postgres
Postgres Administration:solaris:cmd:::/usr/postgres/8.2/bin/pg_ctl:uid=postgres
Postgres Administration:solaris:cmd:::/usr/postgres/8.2/bin/pg_resetxlog:uid=postgres
Postgres Administration:solaris:cmd:::/usr/postgres/8.2/bin/postgres:uid=postgres
Postgres Administration:solaris:cmd:::/usr/postgres/8.2/bin/postmaster:uid=postgres

Starting PostgreSQL
You can start PostgreSQL using the following SMF command from an account with the appropriate privileges:

$ su - postgres
$ svcadm enable svc:/application/database/postgresql:version_82

Initial Configuration
By default, PostgreSQL is configured to trust all of the local users. That's not a good practice because all your local users may connect to PostgreSQL as a superuser. The first to do is setting up a password for the postgres user:

$ psql -U postgres
postgres=# alter user postgres with password 'your-password';

Exit psql with the \q command and change the /var/postgres/8.2/data/pg_hba.conf file to set an appropriate authentication method and change the following line:

[/var/postgres/8.2/data/pg_hba.conf]
local all all trust

with, for example:

[/var/postgres/8.2/data/pg_hba.conf]
local all all md5

Next time you connect, PostgreSQL will be asking you for the user password. Now, let's refresh the PostgreSQL service so that PostgreSQL will receive a SIGHUP signal an re-read the pg_hba.conf file:

$ svcadm refresh svc:/application/database/postgresql:version_82

Done!
You're now running a PostgreSQL instance on your Solaris box ready to be given to your database administrator, ready for production use.

How to Add/Remove network interfaces to a running zone container

Well good morning everyone. This is a quick tutorial on how to add a network interface to a running zone container in solaris 10, without have to go through the trouble of rebooting the zone. Also not e that this configuration change will persist between reboots. With that being said lets get to it.


First you add the entry to the zone configuration. This is the part that lets it persist between reboots. This is done from the global zone:

# zonecfg -z zone1
zonecfg:slabzone1> add net
zonecfg:slabzone1:net> set address=XXX.XXX.XX.XXX
zonecfg:slabzone1:net> set physical=e1000g0
zonecfg:slabzone1:net> end
zonecfg:slabzone1> verify
zonecfg:slabzone1> commit
zonecfg:slabzone1> exitNow we have to manually add a new interface to the running zone. Do this from the global zone as well

# ifconfig e1000g0 addif XXX.XXX.XX.XXX netmask XXX.XXX.X.X zone zone1 up

Created new logical interface e1000g0:3

Note: The ‘addif’ tells ifconfig to create a logical interface using the next available.

# ifconfig -a
lo0:1: flags=2001000849 mtu 8232 index 1 inet 127.0.0.1 netmask ff000000
e1000g0:1: flags=1000843 mtu 1500 index 2 inet XXX.XXX.XX.XXX netmask ffffff00 broadcast XXX.XXX.XX.XXX
e1000g0:3: flags=1000843 mtu 1500 index 2 inet XXX.XXX.XX.XXX netmask ffffff00 broadcast XXX.XXX.XX.XXX

That's it! you're done.

In case you want to remove the interface -

To remove the interface from a running zone. From the global zone, remove the interface. You must first determine which logical interface [alias] you wish to remove.

# ifconfig e1000g0:3 down
# ifconfig e1000g0:3 unplumb
# zonecfg -z zone1
zonecfg:slabzone1> remove net address=XXX.XXX.XX.XXX
zonecfg:slabzone1> commit
zonecfg:slabzone1> exit

All Done Now you can enjoy your newly added interface lol :)

Friday, June 4, 2010

How to lock your screen on snow leopard

Well for the past couple of days my friend and i have been trying to figure out how to lock the screen in snow leopard well mac osx for that matter in general, Well after hours of googling i finally figured it out. check it out.


1. Open Automator (in your Applications folder) and choose Service from the list of templates provided and click the Choose button.


2. In the left hand column under Library, select Utilities.

3. In the second column, drag “Run Shell Script” to the right hand pane.

4. At the top of the right hand pane where you dragged the Run Shell Script action, click on the menu next to “Service receives” and choose “no input”.

5. Copy and paste the following Terminal command into the empty text area of the Run Shell Script action:

/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend

The entire command should be entered on a single line and note there is a space after “/Menu\”.

6. Choose File–>Save, and give the new service a meaningful name like “Lock Computer” that will appear in the Services menu. Once you’ve done that, you can go to the Services menu (located in the current application menu, next to the Apple menu) and your newly created service should appear there.


7. Next open System Preferences –> Keyboard –> Keyboard Shortcuts and select Services in the left column.

8. Scroll down to the bottom and under the General category, you should see your newly created service listed there. Select it, then Double-click close to the right side of the selected line to reveal a field where you can enter a custom keyboard shortcut. Enter an easy to remember but unique keyboard shortcut (I chose to go with ctrl+option+command+L), and then quit System Preferences.


9. enjoy locking your screen =) yeaaaaaaaaaaaaah booooooooy

Wednesday, June 2, 2010

freebsd 8.1 beta

FreeBSD 8.1 BETA1 is available for downloading on (most of) the mirrors, as mentioned on the FreeBSD Stable Mailinglist:

The first of the test builds for the FreeBSD 8.1 release cycle is now available for amd64, i386, ia64, powerpc, pc98, and sparc64 architectures. Files suitable for creating installation media or doing FTP based installs through the network should be on most of the FreeBSD mirror sites by now.

For those who cannot wait, this is the link: http://ftp.freebsd.org/pub/FreeBSD/ISO-IMAGES-i386/8.1/

You can change the link to a mirror closer to you by adding your country code, e.g. http://ftp.dk.freebsd.org/ etc etc

Thursday, May 27, 2010

Making my macbook hibernate

This is just a quick guide on how to make your macbook or macbook pro hibernate. Now me personally i dont like to waste my battery life, especially when i'm traveling to different places. Ok enough babbling from me lets get to it. For those that dont know here are the different states of the macbook/macbook pro.

* On – Computer is awake, screen is on, battery is being consumed based on your power settings
* Off – Computer is using no power from the battery
* Sleep – Computer has turned off the screen and has suspended the operating system to RAM (volatile memory).
* Hibernation – Computer has turned off most hardware and has suspended the operating system to the harddrive


When you closed the lib on your macbook/macbook pro it will go to sleep and wake up quickly. However while your laptop is sleeping it is still consuming the battery life.

When the battery reaches a certain low level, the Macbook/macbook pro will automatically switch to hibernation mode and basically shut off so you don’t lose any of your work. Sleep is great for when you’re actively using your computer, but when you want to stretch out battery life for as long as possible, you want to hibernate. Also to note is that it appears that the newer Macbook Pros also write information to the harddrive when sleeping so that when the battery drops to dangerous levels it can jump instantly into hibernation. Apple calls this “Safe Sleep”.


In Terminal/iTerm/etc run the following command to determine your current sleep mode:
pmset -g | grep hibernate

This should return one of the following:

* 0 – Legacy sleep mode. It will save everything to RAM upon sleeping but does not support “Safe Sleep”. Very fast sleep.
* 1 – Legacy “Safe Sleep”. This is the “Safe Sleep”. Everything your laptop goes into sleep, it will save everything to harddisk. Slow on Sleep and Startup.
* 3 – Default. As described above, when sleeping, contents are saved to RAM. When battery runs out, hibernate occurs.
* 5 – Behaves as 1 but applicable only for modern Mac that uses “Secure virtual memory”.
* 7 – Behaves as 3 but applicable only for modern Mac that uses “Secure virtual memory”.

Now edit and save your /Users/username/.bash_profile in most cases, However im a ksh kind of geek so i save my alias in my /Users/unixboy/.kshrc file with the following lines:

alias hibernateon="sudo pmset -a hibernatemode 5"
alias hibernateoff="sudo pmset -a hibernatemode 0"

hibernateon and hibernateoff can be any text you want, you just need to remember what you used


Now you have a handy little command that will let you enable and disable instant hibernation on a whim. Whenever you want your machine to hibernate when you close the lid, just drop to a terminal window and type “hibernateon”. When you’d prefer your laptop to just sleep, type “hibernateoff”.

Sunday, May 16, 2010

Installing the python MySQLdb module on snow leopard

Ive been spending the last 2 nights trying to get the MySQLdb module installed on snow leopard, but i finally got it below are the steps that i took in order to get module installed and working.


1. Install mysql server from the macports tree using the following command:
sudo port install mysql5-server

2. Download a copy of MySQL-python from sourceforge.net at the time of this writing they are up to MySQL-python-1.2.3c1.tar.gz


3. unpack the MySQL-python-1.2.3c1.tar.gz package using the following command:
tar -xzvf MySQL-python-1.2.3c1.tar.gz


4. cd into the MySQL-python-1.2.3c1 directory


5. In the MySQL-python-1.2.3c1 directory there is a file named site.cfg, open that file with you favorite editor (mine being vi :) ) and locate the following line:


# The path to mysql_config.
# Only use this if mysql_config is not on your PATH, or you have some weird
# setup that requires it.
mysql_config = /usr/local/bin/mysql_config


if you are unsure where you mysql_config file is located, just do a search on your system using the find command.

6. Once the site.cfg has been edited now you are all set and ready to install the module with the following command:

sudo python setup.py install


7. enjoy :)

Thursday, May 6, 2010

Trouble shooting suse linux startup issues

Well i know its been a while since ive last posted anything. Ive been on a roller coaster called Life. Well im back now with the latest from me. I,ve been playing around alot with opensuse(suse) and this document is just a general guideline for troubleshooting suse (opensuse) system boot issues.


Symptom:
Regardless of the kernel selected to boot (failsafe or default), a kernel panic stops the system from booting.

Error(s):
RAMDISK: Couldn't find a valid RAM disk image starting at 0.
VFS: Cannot open a root device "sda2" or unknown-block(0,0)
Please append a correct"root=" boot option
Kernel panic - not syncing: VFS: Cannot open a root device "sda2" or unknown-block(0,0)

Probable Cause:
A corrupted or missing initrd.

Resolution:

1. Boot Installed System*.
2. Login as root.
3. Verify that the / (root) and /boot (if used) filesystems are mounted. The mount command should supply sufficient information. If not, comparing its output with the contents of /etc/fstab should.
4. Run mkinitrd.
5. Reboot.

Symptom:
The system fails to boot and prompts for the root password.

Error(s):
error on stat() /dev/hdb3: No such file or directory
Failed to open the device'/dev/hdb3' : No such file or directory
fsck.reiserfs /dev/hdb3 failed (status 0x8). Run manually!
fsck failed for at least one filesystem (not /).

Probable cause:
Invalid/etc/fstabentry, /dev/hdb3 is a non-existent device.

Resolution:

1. Enter the root password to enter maintenance mode.
2. Remount the root filesystem as read-write:
mount -o rw,remount /
3. Edit /etc/fstab and remove the non-existent device entry. Comparing the output of fdisk -l may provide additional guidance for the non-existent device.
4. [CTRL]+[D] reboots.

Symptom:
The system simply hangs after POST. The screen is completely blank. The option to Boot Installed System* is not available.

Error(s):
If Rescue System is attempted, and fdisk -l run, no partitions are seen. If parted is used, and check run,Error: Partition doesn't existis returned.

Probable cause:
The MBR has been damaged or corrupted.

Resolution:

1. Boot Installed System*.
2. Login as root.
3. Reinstall GRUB:
grub-install bootdevicepath (e.g. /dev/sda)
4. Reboot.

-or-

1. If Boot Installed System* is unavailable, the most likely probable cause is that the partition table is damaged or corrupt, no recovery is possible unless a previous backup of the partition table is available.

Symptom:
When the system boots, an error message is seen, and the system locks. Sometimes the screen just goes black or the server reboots. Sometimes all that is seen is the grub details screen halted after trying to load the/boot/initrd(see below).

Error(s):
No setup signature found ...
initrd /boot/initrd
[Linux-initrd @ 0x1fc38000, 0x2a7ab8 bytes]

Probable cause:
Damaged or corrupted kernel in/boot.

Resolution:

1. Boot Installed System*.
2. Login as root.
3. Install a valid kernel rpm. This can be had from the selected installation medium (under /suse/arch) or from our website at http://www.novell.com/download (search the patches section for kernel-).
rpm -Uvh --force kernel-type-revision-arch.rpm
4. Reboot.

Symptom:
The system boots up toSystem Boot Control: Running /etc/init.d/boot.local, then gracefully reboots.

Error(s):
None.

Probable cause:
Corrupted or misconfigured boot script.

Resolution:

1. At the GRUB menu, type in
init=/bin/bash
on the Boot Options line.
2. Edit /etc/init.d/boot.local and modify or remove the corrupted or misconfigured line.
3. Reboot.

Symptom:
Once exited from a virtual console, the console is not respawned. The console prompt just blinks.

Error(s):
INIT: no more processes left in this runlevel

Probable cause:
Corrupt or misconfigured/etc/inittab

Resolution:

1. Login as root.
2. Edit /etc/inittab and change any tty configuration(s) from once to respawn.
3. Reboot or pkill -1 init.

Symptom:
The kernel panics after trying to mount the root filesystem.

Error(s):
Waiting for device /dev/sda1 to appear: . ok
rootfs: major=8 minor=1 devn=2049
rootfs: /sys/block/sda/sda1 major=8 minor=1 devn=2049
mount: unknown filesystem type 'swap'
umount: /dev: device is busy
Kernel panic - not syncing: Attempted to kill init!
Kernel panic: VFS: Unable to mount root fs on sda1

Probable cause:
Corrupt or misconfigured/boot/grub/menu.lst.

Resolution:

1. Boot Installed System*.
2. Login as root.
3. Edit /boot/grub/menu.lst.
4. Modify the kernel parameter root= to point to the correct root partition. fdisk -l should provide sufficient guidance to determine the root filesystem.
5. Reboot.

Symptom:
The system boots to the GRUB prompt (grub>).

Error(s):
None.

Probable cause:
Corrupt or missing/boot/grub/menu.lstfile.

Resolution:

1. Boot Installed System* -or- if sufficiently familiar with GRUB, manually boot the system.
2. Login as root.
3. Verify the existence of /boot/grub/menu.lst.
If existing, but misnamed, rename it.
If corrupt, delete it and Repair Installed System** (just the Boot Loader Configuration check should be sufficient).
If missing, Repair Installed System** (just the Boot Loader Configuration check should be sufficient).
4. Reboot.

Symptom:
The system boots, but filesystems are not mounted. Many mount-related errors are seen during boot.

Error(s):
Mostly mount-related error messages are seen during boot.
startproc: mount returned not-zero exit status
startproc: /proc not mounted, failed to mount: No such file or directory failed

Probable cause:
The mount binary is either corrupt or missing.

Resolution:

1. Either Repair Installed System** -or - the following.
2. Boot into rescue mode (Rescue System) from the selected installation medium.
3. Login as root.
4. Manually mount the root filesystem (i.e., mount /dev/sda2 /mnt). fdisk -l should provide sufficient information to determine the correct partition.
5. Copy in a valid mount binary from the Rescue System.
6. Reboot.

Symptom:
The system boots, but login fails.

Error(s):
INIT: no more processes left in this runlevel
INIT: /etc/inittab[xx]: missing action field

Probable cause:
Corrupt or misconfigured/etc/inittab

Resolution:

1. Login as root.
2. Edit /etc/inittab and change any tty configuration(s) to include an action (once or respawn) in the action field (third column).
3. Reboot or pkill -1 init.

Symptom:
The system boots, but only to a GRUB screen, then hangs.

Error(s):
GRUB Hard Disk Error

Probable Cause:
As the full GRUB prompt is not achieved, the problem lies somewhere in GRUB stage1. The /boot/grub/stage1file may be missing or corrupted.

Solution:

1. Boot Installed System*.
2. Login as root.
3. Copy /usr/lib/grub/stage1 to/boot/grub/stage1.
4. Reinstall GRUB:
grub-install bootdevicepath(e.g., /dev/sda).
5. Reboot.

-or-

1. Boot Installed System*.
2. Login as root.
3. Identify the installed version of GRUB:
rpm -q grub
4. Remove the installed version. E.g.,
rpm -ev --nodeps grub-0.97-16.1
5. Reinstall the grub package. This can be had from the selected installation medium (under /suse/arch) or from our website at http://www.novell.com/download (search the patches section for grub).
rpm -Uvh grub-version.rpm.
6. Reinstall GRUB:
grub-install bootdevicepath(e.g.,/dev/sda).

Symptom:
The system either doesn't boot, or boots, but some modules aren't loaded and/or some devices are undetected.

Error(s):
FATAL: Error insertingmodulename(modulepath): Unknown symbol in module, or unknown parameter (see dmesg).
modulename: Unknown symbol symbolname

Probable cause:
Occasionally, when modules are updated, the modules dependency file/lib/modules/kernelversion/modules.depis improperly configured or corrupted prior to updating the initial ramdisk.

Resolution:

1. Boot Installed System*.
2. Login as root.
3. Run depmod to regenerate the modules dependency file.
4. Run mkinitrd to generate a new initial RAM disk image.
5. Reboot.

Symptom:
EVMS is used for the root filesystem. The system doesn't boot, with errors related to finding the root filesystem.

Error(s):
Waiting for device /dev/evms/lvm2/system/root to appear: ... not found

Probable cause:
The initial RAM disk image lacks EVMS support.

Resolution:

1. Boot the rescue system and enter the shell.
2. Probe EVMS information:
echo "probe" | evms -s
3. Query devices:
echo "q:d" | evms -s
4. Query volumes:
echo "q:v" | evms -s
This should display the name your root container.
5. Mount the root filesystem (note the comma in the mount command):
mkdir -p /old
echo "mount:/dev/evms/lvm2/system/root,/old" | evms -s
6. The contents of the old root filesystem should be visible now:
ls -l /old/
7. Enter the environment of the installed system:
chroot /old
8. Generate a new inital RAM disk, with EVMS support:
/sbin/mkinitrd -f evms
9. Exit the environment of the installed system through [CTRL]+[D].
10. Reboot.


Some Extra information:


Boot Installed System is the process of using a SuSE Linux Enterprise Server installation medium to boot the installed system. These are the steps:

1. Boot the system off of the selected installation medium (CD/DVD in most cases). This medium should be the same (or later) revision level as the installed system. I.e., if the installed system is SLES9SP2, the installation medium should be SLES9SP2 or later.
2. At Welcome screen, Installation should be selected in place of Boot from Hard Disk.
3. Select the desired Language.
4. Accept the License Agreement(s) (if prompted).
5. At the Installation Mode screen, select Boot Installed System. On SLES10 and later, click on the [Other] button to see these options.

**Repair Installed System is a process similar to Boot Installed System and provides a more automatic repair process. In some cases, when a broader approach to fixing the issue is needed (sledgehammer rather than scalpel), Repair Installed System is the desired process. These are the steps:

1. Boot the system off of the selected installation medium (CD/DVD in most cases). This medium should be the same (or later) revision level as the installed system. I.e., if the installed system is SLES9SP2, the installation medium should be SLES9SP2 or later.
2. At Welcome screen, Installation should be selected in place of Boot from Hard Disk.
3. Select the desired Language.
4. Accept the License Agreement(s) (if prompted).
5. At the Installation Mode screen, select Repair Installed System. On SLES10 and later, click on the [Other] button to see these options.

Tuesday, April 6, 2010

Firewall Settings from the command line in Snow Leopard

Maybe someday you need to shutdown or activate the firewall in your mac, and only have access to the command line, then these are the commands to be used.

To check the current status :

sudo defaults read /Library/Preferences/com.apple.alf globalstate

The result will print one of these numbers;

0 = de-activated

1 = on for specific services

2 = on for essential services

if you want to shut it down :

sudo defaults read /Library/Preferences/com.apple.alf globalstate -int 0

PS. Mac OS X comes with an even more powerful Firewall than the one in the system preferences. Open up the Terminal and type “man ipfw” to learn more about it. ;) enjoy

and to turn on for the specific services :

sudo defaults read /Library/Preferences/com.apple.alf globalstate -int 1

The password requested is your own password, and you have to have administrator access to the mac.

This was tested successfully on 10.6.2 (Snow Leopard).


PS. Mac OS X comes with an even more powerful Firewall than the one in the system preferences. Open up the Terminal and type “man ipfw” to learn more about it. :) enjoy

Friday, March 5, 2010

Overclocking the Palm Pre

The Following is a tutorial on how to overclock your Palm Pre.
NOTE:Overclocking your palm pre is not recommended so you are doing this at your own risk
and dont go crying to sprint if your phone breaks :). Well now thats out of the way lets get too it. check it out

To overclock to the CPU's max speed do the following:

echo "600000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq (600 mhz)

to change it back do the following:

echo "500000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq


Making the changes stick after you reboot your phone

Create a file called cpu-scaling in /etc/event.d and put this code in it, then reboot.


# Enables cpu scaling

start on stopped finish
stop on runlevel [!2]

console none

script
echo "500000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "250000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "30" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
end script




Return to A Fixed Frequency

run the following command:

echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor ; echo 500000 >/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed


For Giggles :p Checking Performance and Stats of the palm pre
the following will allow you to check how long your Pre has been running and at what frequency:

cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state


You will get something like this:

600000 906
550000 768
500000 380
250000 0
125000 180505


Well i hope you enjoy your new pre speed :P

Cool Palm Pre stuff

Well i'm back at it again with the Palm Pre just like anything else its a love/hate relationship.Anyway enough rambling from me, the following is a tutorial on how to use the Luna Send command from the command line of the Palm Pre to do some really cool stuff check it out and enjoy :).


1. Using luna-send to refresh the Launcher panel.

command: luna-send -n 1 palm://com.palm.applicationManager/rescan {}



2. Get a list of all installed apps:

command: luna-send -n 1 "palm://com.palm.applicationManager/listLaunchPoints" "{}"


3. Using luna-send to launch an application:

command: luna-send -n 1 palm://com.palm.applicationManager/launch {\"id\":\"com.palm.app.browser\"}
luna-send -n 1 palm://com.palm.applicationManager/launch {\"id\":\"com.palm.app.browser\",\"params\":{\"scene\":\"page\",\"target\":\"http://www.google.com\"}}



4. Using luna-send to download a file to /media/internal/downloads/:

command: luna-send -n 1 palm://com.palm.downloadmanager/download {\"target\":\"http://www.google.com/index.html\"}


5. Using luna-send to control the palm progress animation (The pulsing "palm" logo seen at boot):

command: luna-send -n 1 palm://com.palm.systemmanager/runProgressAnimation {\"state\":\"start\"}
luna-send -n 1 palm://com.palm.systemmanager/runProgressAnimation {\"state\":\"stop\"}



6. Using Luna with GPS from the command line

command: luna-send -n 1 palm://com.palm.location/setUseGps {\"useGps\":\"true\"}
luna-send -n 1 palm://com.palm.location/setAutoLocate {\"autoLocate\":\"true\"}
luna-send -n 1 palm://com.palm.location/getCurrentPosition {}



7. List all of the processes which are running

command: sudo luna-send -n 1 palm://com.palm.applicationManager/running {}
** Message: serviceResponse Handling: 2, { "running": [ { "id": "com.palm.launcher", "processid": "1006" }, { "id": "com.palm.systemui", "processid": "1007" }, { "id": "com.palm.app.email", "processid": "1000" }, { "id": "com.palm.app.phone", "processid": "1001" }, { "id": "com.palm.app.contacts", "processid": "1002" }, { "id": "com.palm.app.camera", "processid": "1003" }, { "id": "com.palm.app.messaging", "processid": "1004" }, { "id": "com.palm.app.calendar", "processid": "1005" }, { "id": "com.palm.app.phone", "processid": "1008" }, { "id": "com.palm.app.camera", "processid": "1014" } ] }



8. Close a process
command: luna-send -n 1 "palm://com.palm.applicationManager/close" "{\"processId\":\"1058\"}"


9. Activate the vibrator:

command:luna-send -n 1 palm://com.palm.vibrate/vibrate {\"period\":1,\"duration\":1000\}

10. Set system volume - "volume" range is 0-100

command: luna-send -n 1 palm://com.palm.audio/system/setVolume '{"volume":80}'

11. Set ringtone volume - "volume" range is 0-100

command: luna-send -n 1 palm://com.palm.audio/ringtone/setVolume '{"volume":100}'


12. Dail a number - this actually calls the number, not just setup

command: luna-send -n 1 palm://com.palm.telephony/dial '{"number":"8001234567"}'


13. Hang up a phone call :-) There are ways to end specific types of calls but I think this is good enough for now. Let me know if you want the other methods.


command:luna-send -n 1 palm://com.palm.telephony/hangupAll {}


14. Send a text message - only need to change phone "value" and "messageText"

command: luna-send -n 1 palm://com.palm.messaging/sendMessageFromCompose '{"recipientJSONArray": [{"lastName": "", "pictureLoc": "", "contactCount": 1, "displayText": "", "firstName": "", "pictureLocBig": "", "imAvailability": 6, "pictureLocSquare": "", "contactDisplay": "", "Person_id": "", "personId": "", "type": "phone", "value": "8165551234", "alreadyValidated": true, "prefix": "to$A", "identifier": ""}], "messageText": "Content of message here"}'


15. set phone to no roam

command: luna-send -n 1 palm://com.palm.telephony//roamModeSet '{"mode":"homeonly"}'


16. set the phone to auto roam

command: luna-send -n 1 palm://com.palm.telephony//roamModeSet '{"mode":"any"}'

17. set a phone to roam only

command: luna-send -n 1 palm://com.palm.telephony//roamModeSet '{"mode":"roamonly"}'

18. Enable Airplane mode

command: luna-send -n 1 palm://com.palm.systemservice/setPreferences '{"airplaneMode":true}'

19. Disable AirPlane Mode

command: luna-send -n 1 palm://com.palm.systemservice/setPreferences '{"airplaneMode":false}'


Well thats all i have for Now, I Hope this was some useful information. Now off to bed until breakfast yeaaaaaaaaah

Friday, February 26, 2010

How to install snow leopard into vmware

I know its been a while since i last posted, just been busy with work and life :). The following tutorial is on how to run mac osx inside of a vmware.

The following items are required to start the hacking process:
- Retail DVD of Mac OS X Snow Leopard (or Leopard)
- VMWare Fusion 2 installed


VMWare Fusion detects the OS based on a checksum for the snow Leopard Installation DVD.

However you can create your own checksums that VMWare Fusion will look for by taking your Snow Leopard image and running the following commands:




Verify you installed VMWare Fusion 2.
Then Open a Terminal window and type the following commands:


sudo bash
cd "/Library/Application Support/VMware Fusion/isoimages"
mkdir original
mv darwin.iso tools-key.pub *.sig original
perl -n -p -e 's/ServerVersion.plist/SystemVersion.plist/g' < original/darwin.iso > darwin.iso
openssl genrsa -out tools-priv.pem 2048
openssl rsa -in tools-priv.pem -pubout -out tools-key.pub
openssl dgst -sha1 -sign tools-priv.pem < darwin.iso > darwin.iso.sig
for A in *.iso ; do openssl dgst -sha1 -sign tools-priv.pem < $A > $A.sig ; done
exit

all done enjoy your new vm of mac osx. also NOTE: if you update vmware fusion you mac osx vm will not work and you will have to go through the hacking process all over again. well im off to breakfast yum :)

Cracking Kerberos Service Tickets (TGS) Using Kerberoasting

As of late I've been spending a lot of time researching and learning different techniques when it comes to attacking Active Directory En...