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”.
Random Adventures and thoughts from the mind of a Security Researcher. Hacking is not a Job its a LifeStyle
Thursday, May 27, 2010
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 :)
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.
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
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
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
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 :)
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 :)
Wednesday, January 13, 2010
Enabling ssh in OpenSuse
Good Morning all. I'm on my OpenSuse journey and learning alot about the OS. This is a quick tutorial on how to enable and access ssh using the following steps.
1. The ssh daemon comes disabled by default. Ssh can be enabled by typing the following command. /etc/init.d/sshd
2. The next step is to add the ssh service to the opensuse firewall you can use the following two methods.
method 1: type: yast firewall
method 2: you can directly edit the /etc/sysconfig/SuSEfirewall2 text file using either vi or emacs i prefer using vi. :)
3. In the /etc/sysconfig/SuSEfirewall2 text file edit the following: FW_SERVICES_EXT_TCP="" and replace it with FW_SERVICES_EXT_TCP="ssh"
4. restart the firewall with the following command: /sbin/rcSuSEfirewall2 restart
Well im off to bed now. Enjoy :p
1. The ssh daemon comes disabled by default. Ssh can be enabled by typing the following command. /etc/init.d/sshd
2. The next step is to add the ssh service to the opensuse firewall you can use the following two methods.
method 1: type: yast firewall
method 2: you can directly edit the /etc/sysconfig/SuSEfirewall2 text file using either vi or emacs i prefer using vi. :)
3. In the /etc/sysconfig/SuSEfirewall2 text file edit the following: FW_SERVICES_EXT_TCP="" and replace it with FW_SERVICES_EXT_TCP="ssh"
4. restart the firewall with the following command: /sbin/rcSuSEfirewall2 restart
Well im off to bed now. Enjoy :p
How to reset/recover the Root password in opensuse
This is a quick tutorial on how to recover the root password on opensuse.
1. Boot the system and select the normal boot menu from the list. Once selected, in the “Boot Options” box type the following.
“init=/bin/bash” if you are using GRUB Boot loader
or
“linux init=/bin/bash” if you are using LILO Boot Loader
This will launch you straight into a Bash shell prompt which comes up even before the Single User mode loads and has the “/” root file system mounted.
2. Do a mount command to check if the root file system “/” is mounted as Read-Write. If root is not mounted as Read-Write, then run the following command:
mount -o remount,rw /
3. Now, simply type the passwd command and enter a new password
4. Reboot the system and log into the box with your new root password.
1. Boot the system and select the normal boot menu from the list. Once selected, in the “Boot Options” box type the following.
“init=/bin/bash” if you are using GRUB Boot loader
or
“linux init=/bin/bash” if you are using LILO Boot Loader
This will launch you straight into a Bash shell prompt which comes up even before the Single User mode loads and has the “/” root file system mounted.
2. Do a mount command to check if the root file system “/” is mounted as Read-Write. If root is not mounted as Read-Write, then run the following command:
mount -o remount,rw /
3. Now, simply type the passwd command and enter a new password
4. Reboot the system and log into the box with your new root password.
Wednesday, January 6, 2010
becoming a hacker
Happy New years to all. I took a nice long break and now I'm back with tutorial on becoming a hacker.
Steps to becoming a Hacker
#####################
#Disclaimer :()
#####################
First before i get into anything let me say that i don't encourage illegal activity so don't blame me if you wind up in jail for your own stupidity :) OK now that i have that out the way lets begin.
This first section will talk about a few things that you must know in order to hack something, when i say something i mean computers, phones etc .... Reading a simple tutorial on the Internet is no where near enough. So i would suggest starting off with learning networking, you use google.com (the gateway to world of information), read a network + book , or a guide to networking don't just read the book strive to understand everything that you are reading because you will need it later on . After reading a general networking book, go for something more specific like TCP/IP. Reading a full book on TCP/IP will improve your knowledge greatly. TCP/IP is the fundamental protocol of the Internet, and not understanding it means that your hacking skills are worthless. Knowledge of networking and TCP/IP will help you understand how and why different kinds of attacks work.
After Learning about networking and tcp/ip move on to Unix/Linux. Now adays there are many computers(servers) running some type of Unix or Linux so knowledge in it is absolutely essential. The best way to learn UNIX or Linux for that matter is to just install it and run it. There is alot of trial and error when learning UNIX/Linux i would recommend reading Running Linux by orielly this is a great book for beginners. I would also suggest starting off without a Gui when learning Linux/UNIX. because hacking is all command line and programming no Gui's like they show in the movies lol :).
The next step which is the biggest one is programming. I would this step the time sink because you will spend alot of time when learning programming. The leap into programming is very hard and can be frustrating. Hackers have been using C and Perl as a language of choice. However python has become a hot language to learn as of late. I would suggest the following languages , python or Perl, C, php, java, and a shell language. most people use bash, but i have crush on ksh (korn shell) :) just having some fun. But all jokes aside do go weak on learning how to program, programmers make much better hackers, that's just how it goes. This all stems back to knowing how things work, if you understand how networks work, how the OS works and know how programs work then you can find way to manipulate these things to let you do whatever you want.
Many people reading this article are probably saying that's all you need to know this is easy. The above topics will take many months or years depending on your situation of reading programming and experimenting. The pieces of the puzzle come together slowly but they take alot of work to put together. but if you commit yourself and preserve you will be fine. Remember the above steps are not written in stone you can go in any order you like. Final note when you understand how networks work, Os's work and how to program, then will all of this comes the knowledge of how security works.
Well I'm off to bed :P i hope this document sheds some light on the subject, and if it doesn't then o well.
Steps to becoming a Hacker
#####################
#Disclaimer :()
#####################
First before i get into anything let me say that i don't encourage illegal activity so don't blame me if you wind up in jail for your own stupidity :) OK now that i have that out the way lets begin.
This first section will talk about a few things that you must know in order to hack something, when i say something i mean computers, phones etc .... Reading a simple tutorial on the Internet is no where near enough. So i would suggest starting off with learning networking, you use google.com (the gateway to world of information), read a network + book , or a guide to networking don't just read the book strive to understand everything that you are reading because you will need it later on . After reading a general networking book, go for something more specific like TCP/IP. Reading a full book on TCP/IP will improve your knowledge greatly. TCP/IP is the fundamental protocol of the Internet, and not understanding it means that your hacking skills are worthless. Knowledge of networking and TCP/IP will help you understand how and why different kinds of attacks work.
After Learning about networking and tcp/ip move on to Unix/Linux. Now adays there are many computers(servers) running some type of Unix or Linux so knowledge in it is absolutely essential. The best way to learn UNIX or Linux for that matter is to just install it and run it. There is alot of trial and error when learning UNIX/Linux i would recommend reading Running Linux by orielly this is a great book for beginners. I would also suggest starting off without a Gui when learning Linux/UNIX. because hacking is all command line and programming no Gui's like they show in the movies lol :).
The next step which is the biggest one is programming. I would this step the time sink because you will spend alot of time when learning programming. The leap into programming is very hard and can be frustrating. Hackers have been using C and Perl as a language of choice. However python has become a hot language to learn as of late. I would suggest the following languages , python or Perl, C, php, java, and a shell language. most people use bash, but i have crush on ksh (korn shell) :) just having some fun. But all jokes aside do go weak on learning how to program, programmers make much better hackers, that's just how it goes. This all stems back to knowing how things work, if you understand how networks work, how the OS works and know how programs work then you can find way to manipulate these things to let you do whatever you want.
Many people reading this article are probably saying that's all you need to know this is easy. The above topics will take many months or years depending on your situation of reading programming and experimenting. The pieces of the puzzle come together slowly but they take alot of work to put together. but if you commit yourself and preserve you will be fine. Remember the above steps are not written in stone you can go in any order you like. Final note when you understand how networks work, Os's work and how to program, then will all of this comes the knowledge of how security works.
Well I'm off to bed :P i hope this document sheds some light on the subject, and if it doesn't then o well.
Thursday, December 10, 2009
Adding users from the command line in Snow Leopard
This is just a quick tutorial on how to add users from the command line in snow leopard. This command will also work in previous versions of os x. The following commands need to be run as root or with the sudo command.
Creating a new user
dscl / -create /Users/bsdjedi
Create a new user and set the default shell for that user
dscl / -create /Users/bsdjedi UserShell /bin/ksh
Creating a new user and setting the uid as well
dscl / -create /Users/bsdjedi UniqueID 800
Setting the password when creating a user
dscl / -create /Users/bsdjedi PASSWORD
or you can use the tradition unix way and run the following:
passwd bsdjedi
If you would like to give a user admin right run the following command
dscl / -append /Groups/admin GroupMembership bsdjedi
This concludes my tutorial on add users in snow leopard ( os x ) from the command line if need more information just do a man dscl. :)
Creating a new user
dscl / -create /Users/bsdjedi
Create a new user and set the default shell for that user
dscl / -create /Users/bsdjedi UserShell /bin/ksh
Creating a new user and setting the uid as well
dscl / -create /Users/bsdjedi UniqueID 800
Setting the password when creating a user
dscl / -create /Users/bsdjedi PASSWORD
or you can use the tradition unix way and run the following:
passwd bsdjedi
If you would like to give a user admin right run the following command
dscl / -append /Groups/admin GroupMembership bsdjedi
This concludes my tutorial on add users in snow leopard ( os x ) from the command line if need more information just do a man dscl. :)
Subscribe to:
Posts (Atom)
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...
-
As of late I've been spending a lot of time researching and learning different techniques when it comes to attacking Active Directory En...
-
I'm currently on a mission to solve every challenge on every level with Mutillidae Vulnerable web application. This post is about J...