Reset admin account login

Ive had to do this more than I care to mention. I should really know it by heart now, but the short version is: boot into the grub menu and select advanced options head into recover mode drop to root shell prompt you’ll need to remount the filesystem that is currently read only:mount -o rw,remount \ change …

Flush DNS cache in Ubuntu

According to quite a few users on Stack Exchange, Ubuntu doesn’t cache DNS queries, but I got into an awkward situation where I couldn’t hit an internal server because my installation was convinced my internal server was being hosted on an external IP.  It wasn’t entirely incorrect, because the server is (sometimes) available externally, but it’s only …

changing hostname in ubuntu

I cloned a virtual server and late realised they had the same hostname. No problem. change the hostname in /etc/hostname: sudo nano /etc/hostname change the hostname in /etc/hosts: this file will contain localhost and your old hostname. eg, 127.0.0.1 localhost 127.0.1.1 <new-host-name> edit this file to suit. Finally, change the hostname in the current session: …

symbolic links in linux and Ubuntu

I always seem to have a tough time getting symbolic links right and often finding myself either Googling them or running test link after test link until I nail it. Normally I follow the mantra: command {something} {somewhere} such as: mount /dev/sda1 /media/mydrive /dev/sds1 being the “something” and the /media/mydrive being the somewhere But with …

Adding additional IP Address to ethernet interface

Scenario: You have several devices within your network, you’ve changed the address range for the network but you’ve forgotten to change one in particular. It’s easier to log into the device than to physically attend to it (it may be headless, it may not be in your immediate vicinity, or you’re just to lazy to get out of your chair to do it.

How to setup BASH custom prompt in Ubuntu I wanted two things: the time in my prompt a colour prompt Basics: it’s located in: ~/.bashrc uses Environment Variable: PS1 time is inserted using: \t time I started here: http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html colour http://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/ PixelBeat discussion on coloured command prompts http://www.pixelbeat.org/docs/terminal_colours/ how to guid for customing the command prompt …

ZFS on Ubuntu 14.04

I found 4x old 750GB hard drives from 2008 which came up as ZFS when I installed them into a new ubuntu system on an old box. I installed ZFSonLinux (specifically ubuntu 14.04), samba (smb) and SSH (OpenSSH) and set to the task of re-creating the volume. Essentially, it was very painless… except for a couple of hours in there one of the power cables had come off one of the raid drives and it took a fair bit of diagnoses to get it sorted. In the end. I resilvered 1.3TB of data and set to the task of working out whether I should delete it or back it up to my new RAID… This is how I did it.