Wednesday, January 13, 2021

HOW TO - Audit MS SQL Sysadmin users

q: how can I query a Microsoft SQL Server to identify accounts granted the system level sysadmin role?


a: try this script:

USE master
GO

SELECT p.name AS [loginname] ,
p.type ,
p.type_desc ,
p.is_disabled,
CONVERT(VARCHAR(10),p.create_date ,101) AS [created],
CONVERT(VARCHAR(10),p.modify_date , 101) AS [update]
FROM sys.server_principals p
JOIN sys.syslogins s ON p.sid = s.sid
WHERE p.type_desc IN ('SQL_LOGIN', 'WINDOWS_LOGIN', 'WINDOWS_GROUP')
-- Logins that are not process logins
AND p.name NOT LIKE '##%'
-- Logins that are sysadmins
AND s.sysadmin = 1
GO

Thursday, December 31, 2020

HOW TO - monitor a URL from CLI during a short outage

 q: The customer rebooted a webserver and wanted to know how to monitor their URL so they would know when the server was back up.  10 years ago they would have used paping by Google but it does not seem to work anymore.

a: Nping.  If you install Nmap, it includes the Nping utility. Open an elevated command prompt and run a command like this, replacing the URL and Port as needed.  NOTE: It will open 100 connections to www.google.com over port 443 and display on the screen a SENT row and a RCVD row.  When you start seeing RCVD rows, the site should be back up.

nping --tcp -c 100 www.google.com -p 443

Tuesday, December 29, 2020

HOW TO - Replace CR LR in a TXT file

 q: The customer has a text file full of data, one value per row.  They want them all in a single row separated by a comma.

a: Using Notepad++, click the Paragraph icon in the toolbar (this shows CR and LF at the end of each line).  From the Menu click Search and Replace.  Find what: \r\n    replace with: ,       Then click Replace All.  done!



Tuesday, July 14, 2020

HOW TO - lookup your external IP from command line

q: I am on a server with restricted browser security, how can I return my external IP address?
a: Using OpenDNS's MYIP feature.  Open a command line and run:
nslookup myip.opendns.com. resolver1.opendns.com

Tuesday, June 16, 2020

Speed Testing

q: How can I test my internet speed?
a: There are a LOT of speed testing sites available now.

Cloud Flare has one - https://speed.cloudflare.com/

Netflix has one that focuses mostly on Download speed - https://fast.com/

Charter / Spectrum - https://www.spectrum.com/internet/speed-test

The original by Ookla - https://www.speedtest.net/

You can even host your own - https://github.com/librespeed/speedtest


Wednesday, March 4, 2020

Temp email for receiving messages

q: What is the fastest way to receive email to a disposable account?

a: If you have a Google/gmail account, it supports adding a plus sign then a descriptor between your name and the @ sign.  And example would be  yourname +bestbuy @ gmail.com for example (without spaces).  Gmail will ignore anything after the plus sign and deliver it to your inbox, but you can sort/filter the messages by this custom recipient.

Another alternative, completely protecting all of your email addresses, is a website called Temp Mail https://temp-mail.org/  This amazing application will generate a Temporary Email Address and show you the inbox.   This is great for testing email servers and email campaigns.  When you close the site the email goes away.  They also have an iOS app available here - https://apps.apple.com/us/app/temp-mail-temporary-email/id1214259095 



New Ad blocking extension for Chrome

q: What is a good way to reduce ads and security concerns from within Chrome?

a: We recently discovered uBlock Origin as a replacement for ABP, AdBlock Plus, etc.
https://chrome.google.com/webstore/detail/ublock-origin/cjpalhdlnbpafiamejdnhcphjbkeiagm?hl=en
We like the additional options and filter lists available.