Friday, April 1, 2016

Sonicwall Password Change on CLI

I had a co-worker reach out to me this morning asking how to change a Sonicwall NSA 2400 password via the console CLI on SonicOS Enhanced 5.9. The built in help and the online documentation did not list this as an option. He resorted to an hour on the phone with support before they offered an undocumented (and probably not supported) command. The syntax is as below:

setAdmin "username", " password"
commit

If you know of a better way, please comment and I will be happy to update this post.

Friday, February 26, 2016

unRAID Is Awesome!

I came across a video on YouTube a few months back and was immediately hooked. Here is the link: https://www.youtube.com/watch?v=LuJYMCbIbPk

This launched my latest computer project. I am planning to put the finishing touches on the tower hardware this weekend (a video card upgrade) to a month long project of selling old computers and parts to raise capitol so I could pay cash for the new build. I was able to sell three systems and put some of the Christmas bonus with cash I had saved up to combine these three computers into one tower running a single Skylake i7 6700k chip. With a Corsair PSU, Case, and liquid CPU cooler, Crucial RAM, two AMD GPUs, and various hard drives I already had, the system took shape and has been running for two weeks quite well. The power savings from cutting three computers down to a single system will provide savings on our power bill, a theme for this year (cutting expenses to pay the house off faster). My former gaming/work from home desktop, Reba and Summer's shared workstation for photo/video editing and watching educational videos, and the home server I was running in the basement now run from a single system in my office that is so quite, I have decided to put a reminder on my calendar to clean the dust filters monthly so I do not forget it is there.

What is unRAID? It is a platform built on Linux with a great set of tools available out of the box and a straightforward user interface for configuring and managing these tools. It includes support for such modern conveniences as Docker containers and KVM virtual machines. The magic of being able to pass multiple graphics cards and other peripherals at the hardware level to different VMs means each virtual workstation functions as an independent system with full video performance, separate sound playback, and user input for each user. I can even pass an entire USB root hub (or multiples) through to a VM to get further functionality and add USB devices to the VM after it has started up (when the USB device assignment cannot be changed at the VM config level). I use this to connect USB storage to the VM for formatting flash drives or adding other USB peripherals.

The network attached storage function of the server combined with a container for CrashPlan and another for Plex means I can shut my VM down when I do not need it without affecting the backups I host for family all over the country or media streaming of our music or digital movie collection. The VMs are portable, so I can move them to the next unRAID build when this box ages enough to warrant major upgrades or replacement. The software allows me to add, remove, or upgrade hard drives as I need to add capacity, including a parity disk to support single drive failure. At a starting cost of $59 at the time of this writing from https://lime-technology.com/, the software is very reasonable compared to a Windows Server license.

The system isn't without a hitch here or there. I have to disconnect one USB hub built into a monitor and an external hard drive I back up to in order to get the system to boot fully. I still need to track down if this is an OS or UEFI issue, but since I only have to reboot to change hardware, I can live with the issue for now since the hardware is basically finished.

Maybe I can get some photos posted of the system after I give the presentation to my coworkers next week.

Friday, February 14, 2014

Amazing Memories

Today while I was at work, I got a surprise (planned) visit from my wife, daughter (almost 3 now, unbelievable how the time flies), and our dog. They brought me a frog balloon hugging a heart that says "I LOVE YOU!" and several other goodies/snacks. I sat at my desk for a few moments after they left and thought back to when we were in Canada for an 8 week contract gig I had for a hosting/information system design company. One night while there, we set an alarm for 2:00AM, bundled our daughter all up in her car seat (she would have been 7 months old at the time), and drove a few hours north of Edmonton, Alberta, to see if we could find any dark sky to watch a potential aurora borealis. We sat there in the dark for what must have been hours watching light dance across the sky before driving back to the house we were staying in. Every so often we would start the car back up to run the heater for a few minutes, but that was one of the things on my bucket list from childhood that I had no idea how to check off the list until the evening before.

I am so blessed to have a wife that has loved me enough to put up with me for four years (and counting)!

Tuesday, October 29, 2013

IT Humor

Scene: a server administrator walks up the the senior server administrator outside the server room.
Admin: "Your backups are full of it!"
Sr. Admin: "Yep, every weekend."

Thursday, January 31, 2013

Remote Server Management Brain Teaser

I have a fun little puzzle to work out. Yesterday around 4pm, one of our remote servers at a branch office in the middle of nowhere (Culbertson, MT) had a RAID controller failure resulting in a corrupt and unbootable ESXi 5.0 server. This is a Dell PowerEdge 1950 III server with a DRAC 5 card. I have the system booted up via DRAC from a live Ubuntu 12.10 desktop CD with mvfs-tools installed so I can access/backup the datastore. I have co-opted the guest workstation from that office via TeamViewer and have shared out a directory. Unfortunately, all the workstations in that office appear to have 250GB HDDs in them (formatted down to 230GB, minus the 15-20GB of OS and applications gives me at most 210GB free). I need to back up a VMDK file that is 250GB, and since I can't boot the ESXi box to export (compress) the vm image, I'm sorta limited on my options. I could overnight a USB HDD for them to plug into the server, I could try to split the VMDK into multiple 25GB files and try to copy the first two or so to another system, or something else. Still pondering this one while one of the staff in that office runs home to see how big her external hard drives she isn't using are.

Sunday, September 9, 2012

Installing MPD on Ubuntu Server

I have been working on a project for my 1 1/2 year old daughter this weekend and just got it working before church this morning. We have a stereo/cd deck in her room and while useful for helping her to go sleep from time to time, there was no way to turn it on or control it without going into her room. Generally, she would wake up more seeing us in her room and would cry/beg for us to get her out of bed if we had to go back in and put some music on to help her go to sleep.

Enter MPD (Music Player Daemon). MPD is a service (a.k.a. daemon in GNU/Linux terms) that allows you to play music from a remote system's hard drive through that same remote system's audio hardware letting you control it from your local system (as I am using it; it does more, but I haven't fully explored it yet). There are many clients you can use to control the music service (Android, Linux, Microsoft, Apple).

The Setup

I already have a FoxConn nt330i nettop running Ubuntu 10.04 x86 Server dedicated to my daughter Summer hosting a motion server that streams a webcam feed of her crib to our local network allowing my wife to check on her during nap times (the grandparents have access too since they live in other states). I figured I could find a way to add in some sort of media playback even though this is a "headless" server (no keyboard or screen hooked up to it, and no GUI running; just a command line server). I found some cheap Harmon/Kardon desktop speakers I had stored away in a box and plugged them in, turned them on, and set them at a medium volume level. I did some Google searches and came across several explanations of basic setups for MPD on desktop versions of Ubuntu, but nothing clear on how to set this all up start to finish on a headless box which does not have any audio playback support by default. This lead me to document what I did in this blog entry should I need to do it again or should someone else be in the same boat as me and not know what pieces are missing from the server version to get the full audio setup working.

Getting It Working

These steps will get you from a clean Ubuntu 10.04 x86 Server install to working MPD controlled by a remote client.
  1. Install Ubuntu 10.04 Server (x86-64 should work, I have only tested on x86). Install options shouldn't affect the rest of this guide, so pick what you normally do when setting up a new box. This should work on other versions of Ubuntu, Debian, Debian-based, or any other version of Linux, but you might have to find your own sources for these packages, resolve dependencies, and compile from source. Test in a virtual machine if you want to try out a different OS. Or you could use Ubuntu.
  2. Install software that is needed for audio, MP3, and MPD.
  3. sudo apt-get install alsa lame mpd
  4. Set your sound levels using the Alsa sound mixer
    sudo alsamixerYou will see a picture like below with your sound output options. Make sure the output you are using is turned up and that the box at the bottom of that channel doesn't have an "m" in it ("m" signifies it is muted). I am using the front audio out jack so I have adjusted the channels marked "master" and "front" using the left and right arrows to select each channel, the "m" key to unmute it, and the up and down arrow keys to adjust the volume level (by default everything is muted and turned all the way down).
    Alsa Mixer
  5. Set your MPD options. Generally all you need to do is make note of the music_directory parameter and the bind_to_address parameter. The music_directory can be anything you want (I set mine to /music and copied all my music into that folder). The bind_to_address is set to "localhost" by default in Ubuntu even though the config file says the default is "any". I set mine to any just in case my IP address changes. You can hard code yours to match your IP address if you want.
    sudo nano /etc/mpd.conf
    update the two lines below in this file
    music_directory        /music
    bind_to_address       any
    press ctrl+o to save (output) the file, followed by ctrl+x to exit the file
  6. Create your music directory if it does not exist.
    sudo mkdir /music
  7. Copy your music into the music directory. You can copy it from a USB flash drive or somewhere on the network for example. I have a central home server that all my data is backed up to and hosted on, so I used rsync to copy all of my MP3s to Summer's computer. Notice the trailing slashes on the paths in rsync. Those are important (and a discussion for another time).
    sudo rsync username@sourceserver:/all/of/my/music/ /music/
  8. Set the music directory permissions. As noted in the mpd.conf file, the mpd user needs read access on the music, and since this isn't private tax data, I just set it to read all for all users.
    sudo chmod -R a+r /music
  9. Restart MPD to apply new settings.
    sudo service mpd restart
    If you get any error messages after issuing this command such as "could not bind to address x.x.x.x" or "failure to read from /music (or whatever you put for your music_directory)" double check the edits you just made by revisiting step 5 paying special attention to anything that might have a typo or wrong IP address in it.
  10. Connect to the server using whatever MPD supporting client you wish (I use an Android app on my tablet, my wife uses a Windows 7 client on her laptop). A list of these clients can be found on the MPD wikia link above. Consult the application's documentation for how to configure connection settings.
  11. Queue up music and see if it works! You might want to start with lower audio levels than what I did, these setting worked for me, but yours may turn out a lot louder depending on what soundcard and speakers you have.
Now Summer falls asleep from time to time with the soothing sounds of Native American flutes or classic lullabies. Since she is still teething, the music helps her relax and fall asleep faster, and can help calm her down when she wakes up with a particularly bad tooth ache. I just started some more quiet flute music for her while typing this when I noticed her fuss a little in her sleep on the webcam.

Thursday, August 16, 2012

Monitoring the Network

I have been deploying PRTG at my new job this week and thought I would write a quick post about the subject. Basically PRTG is an all encompassing solution for monitoring local and remote IT infrastructure. We have a central office with four remote offices that are staffed, and systems in an additional three datacenters. I need to know instantly when the internet goes down at either of two remote sites that have particularly bad DSL service so I can call the staff and have them power cycle the DSL modem as an attempt to restore service. I have PRTG configured to e-mail me if anything goes wrong, day or night, as well as the Android app on my phone and tablet if I happen to be at home and not watching my company inbox. The solution is fast and reliable, with remote probes at each site to continue logging performance and uptime on servers in spite of poor internet reliability. In short, it tells me exactly what is wrong before users call and complain. For more info, take a look at http://www.paessler.com/prtg. Enjoy!