You are here

sysadmin

Remotely Restarting The Management Agents On ESXi 5.x

The ESXi management agents can be restarted from the host's console - which is not very convenient. Fortunately they can also be restarted remotely using the SSH & ESXi Shell services - but these are not enabled by default.

In Virtual Center select the host, then the Configuration tab. In the security section select Services and Properties in order to enable ESXi Shell and SSH. For both services perform a manuals start.

Uncoloring ls

By default on every recent shell the output of ls is colorized. This is a great feature - but it makes using terminals that use a non-standard [not(background==black)] color-scheme awkward.  Things just disappear;  try reading directory name displayed in yellow on a yellow background.  It is difficult.
How this colorization gets setup in openSUSE is that that the ls command is aliased to "ls --color=auto".  You can see this aliasing using the alias command.

Please No 169.254/16

When you bring up at new LINUX OS installation it will typically [at least in the case of CentOS] have a route of 169.254/16 on every interface. These routes are used to support the good and virtuous feature known as "zeroconf". Sometimes however you do not want that route noise - especially if the host is going to be operating as a router or firewall. Fortunately disabling this feature for this specific use-case is easy.

PostgreSQL Table Spaces

A powerful feature of PostgreSQL is the ability to create table spaces and to move database objects between them. Each table space represents a physical storage location; so using table spaces you can tier data onto different grades of storage [SSD vs. fast disk vs. slow disk] as well as move data from storage being retired [like an iSCSI SAN] to a new storage [a Fiber-Channel SAN!].

Windows "Uptime"

Windows XP and its brethren lack an uptime command. Yeah, the reason the probably obvious, but sometimes it would be nice to know. A user says they restarted their workstation... but most user's [including recent college graduates] don't know the difference between logging out and restarting. So how to know how long a workstation has been running?

explorer.exe /separate

The runas tool in Microsoft Windows serves the same purpose as the sudo tool on Open [or at least "open"] platforms. With runas you can execute commands in alternative security contexts. Only some tools in Microsoft Windows aren't normal; that is if you attempt to run them via runas.... often times nothing at all happens. One very significant example of this behavior is the Control Panel (control.exe).

Performing LDAP Binds With NTLM

With either a Windows Active Directory server or a Samba4 Active Directory server very little information is exposed for anonymous searches via LDAP. This means every search has to bind. Simple binds are insecure and in many cases not supported - for good reason, they are hopelessly insecure. But often times one doesn't want to bother with Kerberos (even as great as Kerberos is) due to ticket expiration, keytab paths, etc...

Deindexing A Table (PostgreSQL)

One of the key steps for performing tuning a database is to test indexing strategies and their effect on performance. It is a series of:

  1. Drop the indexes
  2. Create new indexes
  3. Update statistics
  4. EXPLAIN the important queries.

Rinse and repeat.

Encoding sambaNTPassword With Python

Samba's sambaNTPassword attribute, which mimics the corresponding NT / Active Directory attribute, has a value that must be a hex encoded MD4 hash of the user's password with a UTF-16 encoding. Fortunately generating such a string is a Python one-liner.

import hashlib

password = 'fred123'
nt_password = hashlib.new('md4', password.encode('utf-16le')).digest().encode('hex').upper()

Note that Samba wants all the alpha characters in the string as upper-case.The result will always be 32 characters long.

Recovery From Half An MD Mirrored Pair

In the process of decommissioning an old physical server I wanted to recover some data from the server's drives. The failing server was configured with a SATA RAID1 pair that contained a logical volume group (LVM). So I could either boot up the old server, change it's IP address, and recover the data over the network.... or I could just recover the data directly from one of the drives [they are a mirrored pair after all]. But only having a USB caddy for one SATA drive the trick was to get the RAID1 array to come up on my laptop with only one drive.

Pages

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer