How to: Recovering your Debian/FreeBSD root password

November 1, 2008

Hi there again.

Probably, you’ve lost your root password at least one time in your life (yea, you are not the only one 😉 )… There’s no problem, I’m gonna show you a easy way to fix it.

  • For Debian (Using GRUB, anyway, this will work in any boot loader)
  1. In the line where is our Debian installation, press “e”
  2. Now a kind of editor will be opened. Type the following command after the current commands: “init=/bin/bash”
  3. Press enter
  4. Now you would be back in the first step. Just press de “b” key, to boot the system with the new parameters
  5. Now the system prompt would be a root session. But if you try to use “passwd” command, the system will deny the operation. To fix this, type “mount -o remount,rw /dev/[your_drive]“. Usally your drive will be sda1, hda1 or similar.
  6. Now use the passwd root command to change.
  7. Reboot and your computer and use your new root password 😛
  • For FreeBSD
  1. In the boot menu, choose the option 4 “FreeBSD in single mode user”
  2. Now a message like “Enter fill pathname of shell or RETURN for /bin/sh” will be shown. Just press ENTER
  3. The next step is typing “mount -t ufs -a“. This will mount every file system found in /etc/fstab
  4. Now just use the passwd root command
  5. Reboot the system

Adding quotas support on FreeBSD

November 1, 2008

I followed these steps to add the QUOTA module in the kernel. Moreover, the new kernel will has the generic freebsd kernel options.

First, log in the system as root and type the following commands

  • cd /sys/i386/conf
  • vi QUOTAS_SUPPORT        You can write the file name you want
  • In the file type:

include GENERIC
options QUOTA

  • config CUOTAS_SUPPORT         Be sure that you type the file name you typed
  • cd ../compile/CUOTAS_SUPPORT
  • make cleandepend && make depend && make && make install

That’s all. You can also edit the /sys/i386/GENERIC or DEFAULTS file, but it is highly not recommended because you would lost the default kernel configuration.


Some useful *NIX commands

March 12, 2008

This is a collection of some *NIX commands (i’m using it on a FreeBSD  6.2), to manage some system process and signals.

wait -> It restore the second plane of the terminal until the process is running. You can type new commands, but it will be executed when the process ends.

[command] > /dev/null & -> This will not show the messages that the command print in the screen.

nice -> This command sets the priority of a process. The priority range goes from -20 to +20. To use it, type “nice +15 [process]”. You can also add a rule to a user or group using the “-g” and “-u” modifiers.

time -> This command allows you to watch how much time a process needs to execute.


m0n0wall Vs PfSense embedded security systems

January 20, 2008

I’ve found a great report about this BSD based security distros. Enjoy it 😀



Cisco 2007 Annual Security Report avaible

January 17, 2008

Hey, Happy new year 😛

Cisco has released an interesting report about some security topics on the corporation, goverment and home networks.

This is the direct link[pdf]: Cisco 2007 Annual Security Report


Windows XP and WPA2 wireless cipher

December 19, 2007

Finally, i’ve installed DD-WRT in my Fonera :D. After this, i put a WPA2-AES key, but i tried to connect through a Windows XP (SP2) computer and i couldn’t connect!!!

After a google searchs, i found some information about the issue.Basically Windows XP need a patch to support the IEEE 802.11i which had the WPA2 instructions…

Just install it, and reboot your system.

Patch for Wi-Fi Protected Access 2 (WPA2) on Windows XP

Remember, you must get the patch in your OS language o it will not work.


NSA security documents

December 13, 2007

Hey, i founded a webpage full of NSA (National Security Agency) security documents of many security topics like Windows XP, Cisco IOS and much more.