by lunarg on July 23rd 2019, at 09:54
To quickly generate a self-signed certificate, follow the steps below. Note that self-signed certificates should be avoided in production environments.

Generate the private key (here, 1024-bit is used, but you can change that to lower/higher):

openssl genrsa –out ca.key 1024

Generate the certificate signing request:

openssl req –new –key ca.key –out ca.csr

You will be asked for information to include in the signing request:

Country name (2 letters)

State or province

Full locality name (city)

Organization name

Department / organizational unit

Common name (or distinguished name): should be set to the FQDN of your server

E-mail address: set to a local contact (usually the sy  ...
by lunarg on June 7th 2019, at 11:22

If you need to rename all folders and files to lowercase on a case-sensitive filesystem (e.g. ext4 on linux), you can use the following at the bash prompt:

If rename is available (if you have Perl installed, then it usually is):

find . -depth -exec rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;

If you can't use rename, try this:

for SRC in `find my_root_dir -depth`
do
    DST=`dirname "${SRC}"`/`basename "${SRC}" | tr '[A-Z]' '[a-z]'`
    if [ "${SRC}" != "${DST}" ]
    then
        [ ! -e "${DST}" ] && mv -T "${SRC}" "${DST}" || echo "${SRC} was not renamed"
    fi
done
by lunarg on May 13th 2019, at 13:48
It may happen (on badly configured SQL Servers) that the event log for maintenance plans fills up your storage and that it is no longer possible (because the volume is full) to use a task to clear the history. In that case, you can use the script attached to manually clear out the data.

The maintenance plan history is stored in the system database MSDB. If maintenance plans are defined and there's no task to occassionally clear the history, it will continue to fill up the database (and the volume it is on). If there's insufficient disk space, manually running the clean up task will fail because it will temporarily require additional space. The attached script drops some specific constraints  ...
by lunarg on May 2nd 2019, at 13:50

Attached is Microsoft's latest password guidance document.

With the application of the guidelines in this document, you should be able to get better overal security without compromising too much of the user-friendly experience.

by lunarg on April 24th 2019, at 13:47
Sometimes, when working on servers, you may need an USB stick to get some data over quickly. If you're working remotely on servers in a datacenter somewhere, this may not be easy. Fortunately, the remote management tools such as HPE's iLO or Dell's iDRAC provide the ability to connect virtual removable media, allowing you to map an image file as a "virtual USB stick". Although this is very neat, it still leaves you with one issue: how to get your files on such a removable media image. There are several useful tools which allow you to quickly create an USB image but one such method can also be achieved on linux systems with some of the native tools present.

The easiest method would  ...
by lunarg on March 25th 2019, at 13:33
You can reset the root password of any (recent) VMWare appliance, such as the vCenter Server Appliance (VCSA), or Platform Services Controller (PSC) by following the procedure outlined here. Note that you will need to have physical or console access to perform the reset. The reset also requires a restart of the appliance so you'll need to schedule downtime for it.

First of, take a snapshot or backup of the virtual appliance before proceeding. In case the reset should fail, you'll always have a backup to go back to.

Restart the appliance. Right after the BIOS screen, the PhotonOS splash screen will appear for a few seconds.

During this time, press e to enter the GNU GRUB edit menu, allowin  ...
by lunarg on March 25th 2019, at 12:15
You can change the default shell (used when logging on with VMRC or through SSH). By default, this is set to the appliance shell, providing limited functionality. If you rather have BASH as the default shell, you can switch this.

Log on through SSH or VMRC with the root account.

If shell access hasn't been activated yet, run this first:

shell.set --enabled true

If you are running the appliance shell, type shell to launch the BASH shell.

In the BASH shell, at the prompt, type the following to change the default shell to BASH (instead of the appliance shell):

chsh -s /bin/bash root

You'll need to log out for the changes to take effect. The next time you log in, you will log on directly   ...
by lunarg on March 21st 2019, at 12:24
The quickest way to enable auto-logon on Ubuntu 16.04+ and Debian (which are using systemd for management of their services) is by creating an override for the getty service, specifically for tty1 (or another tty if you prefer).

First, determine which tty you wish to have the auto-logon on. These are the terminals linked to the Alt+Fn keys, so tty1 = Alt+F1, tty2 = Alt+F2. The default is always tty1.

Next, create an override by typing:

sudo systemctl edit getty@tty1.service

This will open up a text editor where you can adjust the parameters like so:

[Service]ExecStart=ExecStart=-/sbin/agetty --noissue --autologin myusername %I $TERMType=idle

Replace myusername with the account you wish  ...