My Friends: david, bangg___xx
My Blogs Next Page

david How to Create And Mount A Disk Partition in Linux - Subscribe
This short entry explains how to create a mount a disk partition in linux. I will show you how to mount a peripheral such as a USB stick, External Drive, or anything else that can be easily remove from your Linux machine. Let’s get started.

What you will need:
  • Linux operating system
  • USB stick or external drive
  • Approximately 5 to 10 mins of time

  • Begin by logging into your linux system as su
  • Su - (this will give you uninterrupted access to run commands)
  • Navigate to /home/{yourusername} by typing in cd /home/{yourusername}
  • Create a directory called mount: mkdir mount

  • Navigate to the dev directory on your linux system: cd /dev
  • Now we need to list the files in the /dev directory by executing the command: ls
  • Plug in your usb stick / external drive to your linux system (depending on size this may take a few seconds for the machine to fully recognize your device)
  • Now type the list command: ls
  • Do you notice a new device listed? For example mine is called xvdj your’s will be called something different.
  • Once you have located the name of the device {xvdj} we need to mount it to our /home/{yourusername} directory

    Specify a File System
    In linux there are many types of file systems, but we will talk about. ext2, ext3, ext4. ext2 is the native file system on your linux machine, if you do not specify ext2 your linux system will default to this. ext3 is much like ext2, but that it allows journaling. Journaling does exactly that, it will log the commands and actions that you do. This will allow you recover a file / directory should it be accidently deleted. (this is in no way to be used as a backup utility) ext4 will allow you to create a file system that is up to: 32TB large and will support a file up to: 2TB big. So now that you no some of the differences, lets specify.

  • Begin by enter the command, be sure to change {xvdj} to your device name that your system has given it: mkfs -t ext3 /dev/{xvdj} Keep in mind that running this command can either go fast or slow so be patient. Once it completes, your disk volume will now be formatted with the file system: ext3
  • Optional: You have the ability in the command above to pass the -m {#} flag to change the reserve disk space (this prevents a system crash when the director is full), and the -c flag will add a bad block check, which means every sector on the partition of the device will be checked to see if it can be trusted to reliability hold data. (good for old drives)

  • Navigate back to our /home/{username} by typing cd /home/{yourusername}
  • You will notice if you run the ls command that our mount directory is here. So what we are going to do is mount our /dev/{xvdj} to /home/{username}/mount this will give us the ability to see our devices content in our users mount directory.
  • To mount the device we will enter: mount /dev/{xvdj} /home/{yourusername}/mount now hit enter.
  • If you received an error stating: mount: you must specify the file system type. Then go back to Specify a File Systems in the list above.
  • You're done! You have now mounted a device to your linux file system.

    If you wish to unmount the device/peripheral from your linux system enter the following command.

  • umount /home/{yourusername}/mount (be sure that you are not in the directory when running this, or the device is not running a process when executing the command) If it is you will get an error that says: umount: /home/{yourusername}/mount: device is busy

    Just a heads up that mounting a device in this manner will disconnect upon reboot...see my next post on how to prevent that from happening.
    Mood: introspective
    Music: Reggie and the Full Effect - Sundae Booty Sundae

    david mkfs.ext3: Permission denied while trying to determine filesystem size Oct 4th, 2014 9:33:27 pm - Subscribe
    While trying to mkfs I received an error: Permission denied while trying to determine filesystem size.
    mkfs.ext3: Permission denied while trying to determine filesystem size

    This is a quick entry, I wanted to mount a device to my Linux system, but I received the error:

    mkfs.ext3: Permission denied while trying to determine filesystem size

    I was sure why this was outside of the obvious permission denied, but my focus was on the filesystem size part of this error. Why was it taking so long to determine the filesystem size I thought?

    Well, it does NOT have to do with the file system size of the device, but it on the first two words of the error. Permission denied. I solved this problem by not being an end user with no permissions to the system, I became a super user by executing su -. I then tried my command again:

    Make File System ext3 on Device
    mkfs -t ext3 /dev/xvdj

    Success! The out was:

    My lesson learned here was not to assume always that you have access to everything. You are not always a super user and you should never run as root in production.
    Mood: tired
    Music: No Music

    david Remove Banned IP from Fail2Ban on Ubuntu / Raspberry Pi Sep 27th, 2014 10:10:12 pm - Subscribe
    If you have never used Fail2Ban on your Linux distro. I would greatly recommended it, especially if you seeing a lot of traffic trying to brute force your standard SSH connection.

    Good practice:
    1. Do not SSH on port 22
    2. Do not use root
    3. Disable root

    But this entry is not on good practices on SSH connections, but rather how to remove a ban that Fail2Ban may have done to block you, a client, or a connection that was not intended to be blocked.

    Begin by doing the following:
    1. iptables -L (Do you see your ip in this list?)
    2. iptables -D fail2ban-ssh -s -j DROP
    3. Where you see add the IP that is banned.
    4. Now verify that your IP is no longer in the list: iptables -L

    That's it! Your IP should now be removed! To prevent this from happening again, navigate to the follow path and add your IP address to the safe list:

    1. cd /etc/fail2ban
    2. vi fail.conf
    3. Now locate: # "ignoreip" can be an IP address, a CIDR mask or a DNS host
    4. Add your IP address to this list
    5. Now save with a :x

    I hope this helps you, if you have questions drop me a comment below.
    Mood: Studying
    Music: No music

    david How to Remove Flash from Adobe PDF Document Sep 24th, 2014 10:02:53 am - Subscribe
    This entry explains how to extract Adobe Flash PDF file to a common Adobe PDF file that does not have flash.

    If you have come across this issues, it may be due to a notification that states that Adobe Flash is required to open this Adobe PDF file. Well naturally your thinking a potential virus or malware infection right? Well you should, but I won't get into that.

    So if you do receive a message that states that you need to upgrade your version of Acrobat to view the Adobe Flash PDF I would like you to do the following steps, to avoid having to upgrade.

    1. Begin by opening the Adobe PDF file.
    2. Highlight ALL documents by pressing CTRL+A
    3. Go to: File > Extract from Portfolio
    4. Now fine a destination to save the files.
    5. Once done, hit ok and the files will begin converting to PDF (with NO flash)

    This will save you a call to your IT help desk, and prevent others from having to upgrade they're Acrobat / PDF Readers.
    Mood: good
    Music: No Music

    david Cisco ASA 5505 UL-BUN-K9 Sec+ Firewall Sep 8th, 2014 6:56:40 pm - Subscribe
    This afternoon I purchased myself a Cisco ASA 5505 (EOL) for my home network. My quest is to become a proficient system administrator, and perhaps one day a full stack I figured it would be a good idea to get some of the gear.

    Now then, I have worked on the Cisco ASA 5510 & 5505, but the changes that I have made to it we're fairly easy to do. Open ports, edit ip addressing, and manage traffic But there is so much more to the ASA that I am interested in knowing so I figured I would jump in feet first by screwing up my own network and not someone elses. Here is a little background on the purchase.

    Cisco ASA 5505-UL-BUN-K9 Security Plus Firewall Unlimited Users 25 SSL/IPSec VPN
    Firewall is in perfect working order, no scratches on chassis.
    ASA 5505
    2 Power supplies and cords
    Console cable
    Ethernet cable

    Cisco Adaptive Security Appliance Software Version 8.4(2)
    Device Manager Version 6.4(5)

    Hardware: ASA5505, 512 MB RAM, CPU Geode 500 MHz
    Internal ATA Compact Flash, 128MB
    BIOS Flash M50FW016 @ 0xfff00000, 2048KB

    Licensed features for this platform:
    Maximum Physical Interfaces : 8 perpetual
    VLANs : 20 DMZ Unrestricted
    Dual ISPs : Enabled perpetual
    VLAN Trunk Ports : 8 perpetual
    Inside Hosts : Unlimited perpetual
    Failover : Active/Standby perpetual
    VPN-DES : Enabled perpetual
    VPN-3DES-AES : Enabled perpetual
    AnyConnect Premium Peers : 2 perpetual
    AnyConnect Essentials : Disabled perpetual
    Other VPN Peers : 25 perpetual
    Total VPN Peers : 25 perpetual
    Shared License : Disabled perpetual
    AnyConnect for Mobile : Disabled perpetual
    AnyConnect for Cisco VPN Phone : Disabled perpetual
    Advanced Endpoint Assessment : Disabled perpetual
    UC Phone Proxy Sessions : 2 perpetual
    Total UC Proxy Sessions : 2 perpetual
    Botnet Traffic Filter : Disabled perpetual
    Intercompany Media Engine : Disabled perpetual

    This platform has an ASA 5505 Security Plus license.

    Serial Number:
    Running Permanent Activation Key:
    Configuration register is 0x1
    Configuration has not been modified since last system restart.

    Have one? Or have any suggestions for me? Leave me a comment.
    Mood: good
    Music: Final Fantasy IV Piano Collection

    david If It Scares You: Cisco ASA 5510 Aug 31st, 2014 12:37:34 am - Subscribe
    This is a new type of entry, much like my Linux postings that I have recently been doing, but in these blogs I will be posting about things that made me uncomfortable, but I did them anyways. Success's & failures.

    Well most of you know me as a web developer, but I do other things than web dev. In this past year I have taken myself outside of my comfort level and broaden my knowledge in other areas.

    "If it scares you, you should probably do it."

    This week I was asked to open a specific port on an Cisco ASA 5510, and also configure a Windows Server to adhere to that port on the ASA. I am unable to get into specifics but I can tell you that this was outside of my scope, but I welcomed it.

    That day (Thursday) I successfully con figured the server to listen to the non-traditional port and also configured the router allow the broadcasting of it. After a reboot of the server and an outside internet connection I was able to establish a connection. SUCCESS!

    The next day I received notice that certain users were not able to connect to certain shares on the server. To top it off one of them was in a upper level position. EEK!

    After finding the issue, and finding the solution I relayed my concerns to my sysadmin and he was able to get the disk share re-established. At which point I simply remapped my end users on the client ends. (not all had to be remapped)

    I guess in the end, the configuration issues that I made to the Cisco ASA 5510 (router) and the reboot of the server was not my doing, but the fact that I was able to get the connection re-established was.

    I embrace change, tasks like this regurgitate me. In the mean time I plan on continuing my knowledge with the ASA and seek other tasks as received. It is in my hopes to one day be a full stack administrator, in the mean time...let's all get out of our comfort level, and do something that scares us.

    If it scares you, you should probably do it.
    Mood: good
    Music: FF IV Orchestra

    david Mentioned: News From You on Daily Tech News Show - Aug. 27, 2014 Aug 27th, 2014 10:00:21 pm - Subscribe
    Today I was mentioned on the Daily Tech News Show podcast for August 27, 2014. I submitted a press release regarding Seagate is now shipping an 8 TB 3.5-inch hard drive with a SATA 6 gigabit-per-second interface.

    I really enjoy this show, and not all the links I submit to the show are read or mentioned, but I really enjoy sharing content with the masses as you know by all my entries. happy.gif

    Click here to skip to the mention (4:25) in the show

    ...and yes Dan Patterson |, you said my name correctly. Thanks!

    Mood: good
    Music: No music

    david Apache Web Server Crashes on High Load Aug 24th, 2014 10:31:54 pm - Subscribe
    Need to send traffic to your Apache Web Server, in hopes that you will not bring it down by HTTP or ICMP request? Well read on.

    Well this is unique entry, recently a friend and I we're bench testing a couple servers on different nodes using the Apache Benchmark Tool. In our findings we noticed that 2 of the domains that we tested feel to they're knees due to memory issues. Now then, in no way do I condemn black hat conduct but sometimes the only way to protect your OWN servers is to use penetration testing tools to stress the server.

    Now, there is a plethora of software that can do this locally on the server or for remote usage, but for this entry I will refrain from that.

    I recommend that you take a look at my friends blog on how to protect yourself from an EVASION of traffic.

    External links

    * thanks JV for the initial remote PT.
    Mood: good
    Music: No Music

    david How to OCR a PDF File Using Acrobat Pro Aug 24th, 2014 8:03:42 pm - Subscribe
    I receive a lot of PDF files in fact many more PDF files than word documents now a days. Now a day's being able to search a PDF file or perhaps a PDF file that was created into a doc file can same you time. Here are a few steps that you can do to OCR your PDF so that it can be easily searchable.
    OCR PDF File in Acrobat Pro

  • Begin by opening up a PDF file.
  • Click on Tools located on the right side of the PDF.
  • Now click on the arrow that says Recognize Text.
  • In the list click on In This File.
  • When the menu comes up click on All Pages
  • Now click OK.

    Now you should be able to do a CTRL+F to find words with in the document.
    Mood: good
    Music: Reggie and the Full Effect - G

    david Useful Linux Links for 2014-08-22 Aug 22nd, 2014 5:54:30 pm - Subscribe
    Useful Linux Links for 2014-08-22 - Below are links that I used in a given day that helped me with my goal in Linux System Administration.

  • AirPort Utility 5.6.1 for Windows | mac
  • OPTIMIZE TABLE Syntax | sysadmin
  • 8 commands to check cpu information on Linux | sysadmin
  • How to disable SSH timeout | sysadmin
  • Always Run as Root | humor
    Mood: good
    Music: No Music

    david San Antonio Google Photo Sphere Aug 21st, 2014 7:41:22 pm - Subscribe
    This evening I gave Google Photo Sphere a try at the pool where I live. I also captured the court yard but figured the pool area would have a better view.

    Google Photo Sphere is 360-degree panorama software that is available for Android and iOS, you can find the application in the respected app store. Personally I though the software was really nice and it was very easy to use, let's call the process "circling the dots". Simply rotate in a circle circling the dots, and then viola your done!

    Views: San Antonio, TX by David Polanco

    Just a reminder, stay away from tight quarters. Photo Sphere does a much better job in an open environment.

    External Links
  • Photo Sphere for iOS
  • Photo Sphere for Android
    Mood: tired
    Music: Reggie and the Full Effect - E

    david Useful Linux Links: 2014-08-20 Aug 20th, 2014 6:19:45 pm - Subscribe
    Useful Linux Links for 2014-08-20 - Below are links that I used used in a given day in helping me with my Linux System Administration.
  • VMware Certification Roadmap | edu
  • MailServer - Raspberry Pi as an Email Server | sysadmin
  • Setting up an Ubuntu System as an Email Server | sysadmin
  • Postfix - Community Help Wiki | sysadmin
    Mood: good

    david Google Domains Beta - Invitation Received Aug 19th, 2014 10:44:45 pm - Subscribe
    This afternoon like many others in my Google+ Network we received our Google Domains Invitation from the Google Domains Team.

    Google Domains Invite Only Beta Logo

    Though at the time I was happy and very interested in the program, I did notice that the price per domain would cost me an extra $2.00, now then an extra $2.00 may be nothing you say...but my partner and I have well over 20 or so domains. So I think for now we will stick to

    Here is the notice I received from Google Domains:

    You requested to join the Google Domains invite-only beta and today we’re excited to offer you an invitation to join.

    As you begin to buy, transfer and manage your domains with us or if you try out one of our website building providers, we would love to hear what you think. We welcome all questions and feedback.

    Follow the directions to get started:
    Click the button below to launch Google Domains.

    Enter your unique invitation code: xxxx xxxx xxxx xxxx xxxx
    Please note that our current beta is U.S. only.

    Get Started

    All the best,
    The Google Domains team

    So there you have it, the interface when using the system is very simple and easy, but I am trying to find the added benefit to the service. I am very pleased with Hover and they're simple no BS domain name registration but I am not loyal to any domain name registration service. What are your thoughts?
    Mood: tired
    Music: No music

    david Useful Linux Links: 2014-08-18 Aug 18th, 2014 11:06:08 pm - Subscribe
    This small list was originally created last week 2014-08-08, but I am barely getting to posting them. For those of you that use fail2ban being able to block an IP is easy, but unblocking can be a different matter if you have never done so before. If you have questions leave a comment.

  • CentOS Linux: Stop Monitor From Going to Sleep Using, Turn Off Powersave | sysadmin
  • Primer on reading Michael Jang's Red Hat Linux Certification Study Guide | edu
  • How to manually unban ip blocked by fail2ban | sysadmin
    Mood: tired

    david Belkin WeMo Hacking Using Linux Aug 18th, 2014 11:00:52 pm - Subscribe
    This weekend if I have time I plan on hacking one of my 2 WeMo's. If you have never heard of a WeMo take a look here, it basically allows you to control your homes electronics by turning them off & on.

  • Turning the Belkin WeMo into a deathtrap | hack
  • Things I Know about the WeMo boxes | hack
  • Belkin WeMo remote shell and rapid state change exploit | hack
  • Shell Script To Control Belkin WeMo’s | hack
    Mood: good

    david The Java Life Rap Music Video Aug 15th, 2014 11:04:22 am - Subscribe
    Mood: feisty

    david Useful Linux Links: 2014-08-08 Aug 9th, 2014 1:34:59 am - Subscribe
    Useful Linux Links for 2014-08-08 - Below are links that I used used in a given day in helping me with my Linux System Administration.
  • Cracking SSH with Hydra on Metasploitable in Kali Linux | sec
  • Hacking a Remote Server using Hydra via SSH Dictionary Attack | sec
  • Using Hydra to dictionary-attack web-based login forms | sec
  • Fix Broken Sudo | sysadmin
    Mood: independent
    Music: No music

    david Useful Linux Links: 2014-08-07 Aug 7th, 2014 10:28:29 pm - Subscribe
    Useful Linux Links for 2014-08-07 - Below are links that I used used in a given day in helping me with my Linux System Administration.

  • Linux: Log Everyone Out Of The System | sysadmin
  • In Linux shell, how to delete all files in a directory except one or two | sysadmin
  • Ubuntu ssh: connect to host localhost port 22: Connection refused | sysadmin
  • SSH port will not change | sysadmin
  • How we turn $199 Chromebooks into Ubuntu-based code learning machines for kids | education
  • Installing Tails Live Linux Operating System For Preserving Privacy and Anonymity On The Net | privacy
    Mood: good

    david Linux: Could Not Update .ICEauthority file Aug 3rd, 2014 12:24:01 am - Subscribe
    Below are the steps I took to troubleshoot my creation of the user: david and how I fixed the in ability to update the .ICEauthority file in /home/david/.ICEauthority

    * Be sure you replace all instances with david with your username

    Step by Step:
    1. Begin by logging into root

    2. Locate the home directory of the user that you wish fix. Example: cd /home/david

    3. In some instances you may need to create the user directory as I had to. To do so, in the home directory type in mkdir david

    4. Once the directory is created type in the following so that we can ensure that the user has ownership of the directory. chown david: david .ICEauthority

    5. Logout as root

    6. Login as your username

    7. Success!
    Mood: Tired
    Music: No music

    david Linux: How to Disable the GUI in CentOS Jul 8th, 2014 8:04:29 pm - Subscribe
    This entry explains how to enable / disable to the graphical user interface (GUI) in CentOS by modifying the inittab file. If you are a hard code command line user disabling the GUI will give the added benefit of save resources, and we LOVE saving resources on our servers.

    Begin by opening up the command line and doing the following. (I will assume you know how to open up the command line, but if not it can be found on your gnome, kdm, xdm dock.

    Step 1: In the command line type:
    vi /etc/inittab

    Step 2: Now find the line that states:

    Step 3:Now simply press i (to insert text, then change the id:5:initdefault: to the following:

    Step 4: Once this is complete press the colon, and type wq! (This will commit the change.)

    So what is going on here is that we are modifying the inittab file and telling CentOS to default the multiuser user mode. Doing so will now disable the GUI from CentOS, and now present to command line from now on.

    As always if you have questions, leave a comment. happy.gif
    Mood: good
    Music: No music