Specializing in expert technology advice and implementation in NorthEast Florida

Start/Stop VPN connection automated in a .CMD file

I am pretty proud of this script, as it does what is otherwise a bit fiddly -- and it took some fairly in depth research to come up with a solution that uses only what is provided out of the box with Windows 10. My only issue that remains with it is that I had to include the username & password - I would like to find a way to have it use the existing credentials in the VPN configuration. (Let me know if you have any bright ideas!!)

I used clues from a lot of places to do this, but the clever logic that allows me to do the conditional code step that you see here:

Another toy - testing NGINX as a web server

root@pve:/var/lib/vz/dump# pct restore -storage local-lvm --rootfs 4 300 vzdump-lxc-200-2016_11_19-12_23_24.tar.gz
  Logical volume "vm-300-disk-1" created.
mke2fs 1.42.12 (29-Aug-2014)
Discarding device blocks: done                            
Creating filesystem with 1048576 4k blocks and 262144 inodes
Filesystem UUID: 602ba375-c829-40d2-a1bb-8275d5ce9407
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done                            
Writing inode tables: done                            

Removing dead tracks from itunes

This was very useful for a corrupted song db in itunes:

You can use a playlist to collect dead tracks.
Create new regular playlist – Playlist1
Select whole library and drag to Playlist1
Create new Smart Playlist with the rule: Playlist is not Playlist1
Live updating checked – after you run it, uncheck live updating or you may not be able to delete tracks.
This playlist should contain all the dead tracks
Use shift-del to remove from library

Proxmox convert from OpenVZ to LXC

This is a bit exciting for me - less so for anyone else I guess :(
But it has taken me a while to get to this point.

Took a snapshot backup from the office proxmox V3.x server, and brought it home t o convert to LXC (Linux Container) format on a proxmox 4.2 server (apparently LXC is the go nowadays - who knew?)

Here's the magic bit:

Saved: Proxmox Linux Header updates caused boot failures

I have been grappling with this for a while - turns out it was something very simple:

grub-mkdevicemap -n

root@pve:~# grub-mkdevicemap -n
root@pve:~# update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-2.6.32-39-pve
Found initrd image: /boot/initrd.img-2.6.32-39-pve
Found memtest86+ image: /boot/memtest86+.bin
Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin

Notes from boot-repair utility

I have always found the boot area a difficult one to understand.
Take this link as an example:

And AFTER the repair:
http://paste.ubuntu.com/11527984/ <-- This one Failed...

Another try - it inlcuded a re-install of Grub
Please write on a paper the following URL:

That's the out put from my laptop after I munged the disk arrangement adding a larger drive.

Change the password of a user in Drupal 7

drush upwd admin --password=mynewpassword

If you accidentally remove the 0 user (UID = 0) in DRUPAL 6

Will typically give you and error message like this:
Could not login with user ID #0. This is typically caused by importing a MySQL database dump from a faulty tool [error] which re-numbered the anonymous user ID in the users table.

disable password authentication for sshd

This is considered good practice for any linux platform that has publicly addressable interfaces... Of course you will need to setup PKI public/private keys for any secure login. I am not suggesting that you turn off authentication entirely !
I had a VPS linux host out there untended for a while, and the hackers find it irresistible - there were 11,000+ authentication failures in the logs.

To stop password authentication by sshd, just add these entries to your /etc/sh/sshd_config file:

Reset the root password for MariaDB (or MySQL)

Please note that if you haven't changed over to MariaDB - you should ... But more to the point for this post - if you need to reset your root mysql or mariadb password, the easiest way to do it on an Ubuntu platform is to run the following commands: First, you need to know what version of mysql or MariaDB you have, so run this to search for the package name: root@bazingah:/usr/local/bin# dpkg-query -S mariadb-server


Subscribe to Jax Beach Technology Services RSS