Author: jbmurphy
-
mysql_secure_installation
I just learned about the script: /usr/bin/mysql_secure_installation. Very cool. Here are the commands that the script actually runs. I am going to add these to my provisioning script (I already take care of the root password piece): mysql -e “DROP DATABASE test;” mysql -e “DELETE FROM mysql.user WHERE User=’root’ AND Host!=’localhost’;” mysql -e “DELETE FROM…
-
CentOS, NTPD, VMware and sleeping.
I have a MacPro at home, and I am running VMware Fusion on it. At night, I sleep the machine to save electricity. I have a CentOS guest running and the time is always out of sync. After the VM is restored from sleep, the NTP service is no longer running and my time really…
-
Powershell script to install Cygwin
I like having Cygwin installed on my machine, and since I always re-image, I needed a script to install Cygwin automatically. This will download and install Cygwin and install the openssh package.
-
OpenVPN on windows with a TUN device
Since my laptop hard drive died, I did not have access to my home VPN. I needed to set up OpenVPN on windows. I setup my PKI and installed the portable version of OpenVPN. Tried connecting and got this error: There is a problem in your selection of –ifconfig endpoints [local=X.X.X.X, remote=X.X.X.X]. The local and…
-
Running a BASH script when my Laptop is opened at home – Part 1
My laptop hard drive died. I was upset only because there was data on my laptop that had not been moved over to my desktop. My desktop has time machine and is rsynced to several other drives and locations. So I lost data. My own fault because I was not diligent in moving data off…
-
CentOS Kickstart with local CDROM media and a “http config file”
At our NYC office, I have a PXE/Kickstart system setup. All I need to do is boot to PXE, and I can install CentOS with very little intervention. I have to choose Server vs Desktop (each choice points to a different http hosted kickstart cfg file.) and I have to setup my partitons how I…
-
VMware ESX and vmdks larger than 256gb
News to me! if you want to create a vmdk larger than 256 gb, you need to blow away the datastore and re-create it with a larger block size! Move everything off the datastore. Under the configuration tab, Right click and delete the store Click add storage and it will find the unused disk and when Creating…
-
Install Windows MovieMaker silently
Not that you would want to, but here it is. wlsetup-all.exe /q /AppSelect:MovieMaker /NOTOOLBARCEIP /NOSEARCH /NOHOMEPAGE /NOCEIP /NOMU /NOLAUNCH
-
Using a MacBook to connect to a Cisco router
We have a “USBG-232MINI” USB to Serial adapter and I needed to connect to a Cisco router. GNU screen to the rescue!! The command is screen /dev/tty.usbserial-A9005yuF 9600 (Where A9005yuF is probably unique) And to exit hit Control+A then K.
-
PowerShell to list all users and when their password expires
I wanted to dump a list of accounts and their password expiration dates – accounts that were not disabled, that had a certain description, and were not set with “Password never expires” (Get-ADUser -filter {(Description -notlike “Service*”) -and (Enabled -eq “True”) -and (PasswordNeverExpires -eq “False”)} -properties *) | select samaccountname,description, @{N=”LastChanged”;E={(Get-Date([System.DateTime]::FromFileTimeUtc($_.pwdLastSet))).ToShortDateString()}}, @{N=”Expires”;E={(Get-Date([System.DateTime]::FromFileTimeUtc($_.pwdLastSet))).AddDays((Get-ADDefaultDomainPasswordPolicy).MaxPasswordAge.TotalDays).ToShortDateString()}}
