fbpx

Putty Timeout After Idle Time

Check if your system is setting the environment variable TMOUT. To check this you can just do:

env | grep TMOUT

or

echo $TMOUT

If it is set, you could change it or unset it. To change the value:

export TMOUT=3600

Where the number is the number of seconds until you get logged out. Otherwise unset it to turn off the feature:

unset TMOUT

Note, it may be that your system administrator has set this for security reasons. So if you are not the system administrator you may want to check this before changing anything yourself.

Nagios Password Change on Windows Boxes

In the NSC*.ini file you will find a password parameter and you need to put your SNMP community string. Mine seemed to need it here.

NSC*.ini excerpt

; ;# PASSWORD ; This is the password (-s) that is required to access NSClient remotely. If you leave this blank everyone will be able to access the daemon remotly. password=public ;

Fiberchannel “Round and Round”

So yet another issue with HBAs this time with an older QLogic qle2462 and a set of 12TB Promise Arrays. Save your self some trouble and download the driver from VMware, qla2xxx-934.5.4.0 and inject it into your Update Manager…

APD VMware Storage Issues

So I had this issue with dead paths:

~ # esxcli storage vmfs extent list
Volume Name VMFS UUID Extent Number Device Name Partition
———– ———————————– ————- ———————————— ———
BackupSAN 50eb10a0-4f1a9256-5434-90e2ba22c340 0 naa.6842b2b000687ee500002a4850ea9934 1
Operations 5053a326-370b5095-739a-00137234e92a 0 naa.68b7b2acf4b8d12b3a051502000020ca 1
Templates 506204f5-fe667464-c1b1-90e2ba22c340 0 naa.68b7b2acf4b80148200615353227e7f3 1
CorpStor01 5053a1e4-e68f6227-0e8a-001ec9fd0643 0 naa.68b7b2acf4b8b1163a05e5010000c0a2 1
~ # esxcli storage core device detached list
Device UID State
———————————————————— —–
naa.6090a058e015725f990965020000a09e off
naa.68b7b2acf4b8f10e0d0585010000004c off
t10.FreeBSD_iSCSI_Disk______100000010_______________________ off
~ #
~ # esxcli storage core device detached remove -d naa.6090a058e015725f990965020000a09e
~ # esxcli storage core device detached remove -d naa.68b7b2acf4b8f10e0d0585010000004c
~ # esxcli storage core device detached remove -d t10.FreeBSD_iSCSI_Disk______100000010_______________________

How to SSH Between Two Linux Computers Without Needing a Password

1. ssh to server1

Connect to server1 and generate a public/private key pair.

1
2
3
ssh myusername@server1
password:
ssh-keygen -t rsa

When you run this command you will be prompted to answer several questions. Just hit enter each time until you are returned to a prompt.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Generating public/private rsa key pair.
Enter file in which to save the key (/home/local/myusername/.ssh/id_rsa):
Created directory '/home/local/myusername/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/local/myusername/.ssh/id_rsa.
Your public key has been saved in /home/local/myusername/.ssh/id_rsa.pub.
The key fingerprint is:
15:68:47:67:0d:40:e1:7c:9a:1c:25:18:be:ab:f1:3a myusername@server1
The key's randomart image is:
+--[ RSA 2048]----+
|        .*Bo=o   |
|       .+o.*  .  |
|       ...= .    |
|         + =     |
|        S +      |
|         .       |
|      . .        |
|      E+         |
|      oo.        |
+-----------------+

Now you will need to copy the public key you just generated and save it somewhere, you will need it later. Also ensure when you copy the key that the text is all on one line, if there are line breaks in the text, it will cause problems later when you try and use the key.

1
2
3
4
5
6
7
cd .ssh
cat id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAyFS7YkakcjdyCDOKpE4RrBecRUWShgmwWnxhbVNHmDtJtK
PqdiLcsVG5PO94hv3A0QqlB1MX33vnP6HzPPS7L4Bq+5plSTyNHiDBIqmZqVVxRbRUKbP44BaA9RsW2ROu
8qdzmXRPupkyFBBOLa23RJJojBieFGygR2OwjS8cq0kpZh1I3c1fbU9I5j38baUK0naTBe2v7s/C8allnJ
hwkfds+Q9/kjaV55pMZIh+9jhoA8acCA6B55DYrgPSycW6fEyV/1PIER+a5lOXp1QCn0U+XFTb85dp5fW0
/rUnu0F9nBJFlo7Rvc1cMuSUiul/wvJ8tzlOhU8FUlHvHqoUUw== myusername@server1

2. ssh to server2

Now we will copy the public key from server1 to server2.

1
2
3
4
5
6
7
ssh myusername@server2
password:
mkdir .ssh
cd .ssh
vi authorized_keys
# paste the public key
chmod 600 authorized_keys

3. Test that your setup is working

1
2
3
4
ssh myusername@server1
password:
ssh myusername@server2
# you should not be prompted for a password!

Autologin for Windows Server

(From the Microsoft Site) To use Registry Editor (Regedt32.exe) to turn on automatic logon, follow these steps:

Click Start, and then click Run.
In the Open box, type Regedt32.exe, and then press ENTER.
Locate the following subkey in the registry:
HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon
Double-click the DefaultUserName entry, type your user name, and then click OK.
Double-click the DefaultPassword entry, type your password, and then click OK.NOTE: If the DefaultPassword value does not exist, it must be added. To add the value, follow these steps:
On the Edit menu, click New, and then point to String Value.
Type DefaultPassword, and then press ENTER.
Double-click DefaultPassword.
In the Edit String dialog, type your password and then click OK.
NOTE: If no DefaultPassword string is specified, Windows automatically changes the value of the AutoAdminLogon key from 1 (true) to 0 (false), disabling the AutoAdminLogon feature.

On the Edit menu, click New, and then point to String Value.
Type AutoAdminLogon, and then press ENTER.
Double-click AutoAdminLogon.
In the Edit String dialog box, type 1 and then click OK.
Quit Registry Editor.
Click Start, click Shutdown, and then type a reason in the Comment text box.
Click OK to turn off your computer.
Restart your computer. You can now log on automatically.
Notes To bypass the AutoAdminLogon process and to log on as a different user, hold down the SHIFT key after you log off or after Windows restarts.

Registry change will not work if the “Logon Banner” is defined on the server either by a Group Policy object (GPO) or by a local policy. When policy is changed to not impact server, the feature works as expected.

An interactive console logon that has a different user on the server changes the DefaultUserName registry entry as the last logged on user indicator. AutoAdminLogon relies on the DefaultUserName entry to match the user and the password. Therefore, AutoAdminLogon may fail. You may configure a shutdown script to set the correct DefaultUserName entry for AutoAdminLogonAs. For more information, click the following article number to view the article in the Microsoft Knowledge Base:

119364
(http://support.microsoft.com/kb/119364/ )
AutoAdminLogon loses DefaultUserName

Error Installing a Botched Installation of VMware Tools

A previous installation of VMware Tools has been detected.
The previous installation was made by the tar installer (version 4).

Keeping the tar4 installer database format.

You have a version of VMware Tools installed. Continuing this install will
first uninstall the currently installed version. Do you wish to continue?
(yes/no) [yes]

If you select yes, the following error message appears:
Error: Unable to find the binary installation directory (answer BINDIR)
in the installer database file “/etc/vmware-tools/locations”.
Uninstall failed. Please correct the failure and re run the install.

Execution aborted.

To solve this issue, remove the /etc/vmware-tools/locations file and reinstall VMware Tools.

Removing Syslogd Installing Rsyslog and Configure to Splunk

yum shell
remove sysklogd
install rsyslog
run
exit

vi /etc/rsyslog.conf
paste in the below:
# ### begin forwarding rule ###
# The statement between the begin … end define a SINGLE forwarding
# rule. They belong together, do NOT split them. If you create multiple
# forwarding rules, duplicate the whole block!
# Remote Logging (we use TCP for reliable delivery)
#
# An on-disk queue is created for this action. If the remote host is
# down, messages are spooled to disk and sent when it is up again.
$WorkDirectory /var/lib/rsyslog # where to place spool files
$ActionQueueFileName fwdRule1 # unique name prefix for spool files
$ActionQueueMaxDiskSpace 1g # 1gb space limit (use as much as possible)
$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
$ActionQueueType LinkedList # run asynchronously
$ActionResumeRetryCount -1 # infinite retries if host is down
# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
*.* @@your splunk server:514
# ### end of the forwarding rule ###

chkconfig rsyslog on
service rsyslog restart

VMware Weird Latency Dell R815 Broadcomm Nic

So we were having this weird latency issue with our new R815’s and the Broadcomm nics utilizing iSCSI on a segregated lan.

Turns out we needed the BCM-NetXtremeII-5.0-offline_bundle-940344.zip driver imported into update manager, a reboot later, we were all happy!