MoonPoint Support Logo

 


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals



Advanced Search
July
Sun Mon Tue Wed Thu Fri Sat
           
         
2017
Months
Jul


Sun, Jul 30, 2017 10:48 pm

Determining Motherboard Manufacturer and Model on a Windows System

I wanted to determine the manufacturer and model number of a motherboard in a Windows server at a remote location. I didn't want to drive a half hour there, open up the system's case to make that determination, and drive a half hour back home. Since I have Remote Desktop Protocol (RDP) access to the system, I connected by RDP and ran the WMIC command wmic baseboard get product,manufacturer,model,serialnumber,version from a command prompt. I saw the following output:

C:\>wmic baseboard get product,manufacturer,model,serialnumber,version
Manufacturer                      Model  Product     SerialNumber   Version

00000000000000000000000000000000         S03 Server  QCHCNB3440135  Revision A



C:\>

Since the manufacturer was listed as a string of all zeros, I decided to install the free Speccy program from Piriform. When I installed and ran the software, it also showed all zeros for the manufacturer.

[ More Info ]

[/os/windows] permanent link

Sat, Jul 29, 2017 10:05 pm

Chopping off the leftmost or rightmost character of a string in Excel

You can use the LEFT and RIGHT functions in the Microsoft Excel spreadsheet program along with the LEN (length) function to remove the leftmost or rightmost character from a text string. These functions also work in Google Sheets, LibreOffice Calc, which is the spreadsheet component of the LibreOffice software package, and Apache OpenOffice Calc, which is the spreadsheet program included in Apache OpenOffice, though in the Apache OpenOffice Calc program you need to substitute semicolons (;) for commas (,) in the formulas. E.g., in Apache OpenOffice Calc you would need to use =RIGHT(A5;LEN(A5) -1) , instead of =RIGHT(A5,LEN(A5) -1) as you would in the other programs.

Removing the leftmost character

The syntax for the RIGHT function is RIGHT(text,[numchars]). If you don't include numchars, i.e., you use RIGHT(text) then the value returned is the rightmost character in the string. E.g., if cell A1 has 1ABC in it, then =RIGHT(A1) returns C. But suppose, instead, you want to remove the leftmost charaacter from a string. You can use the RIGHT function to do so. E.g., suppose I have a column of values, e.g.:

  AB
1 1ABC 
2 2DEF 
3 3GHI 
4 4JKL 
5 5MNO 

If I want to remove the number at the beginning of each text string and put the shortened strings in column B, I could, since the strings are all 4 characters long, use =RIGHT(A1,3) in column B1 and then copy the formula down through the other cells in column B by clicking in cell B1 and holding down the leftmost mouse button and dragging downwards through the other cells in column B and then hitting Ctrl-D.

But suppose the strings vary in length. I.e., suppose I have a worksheet containing the following strings in column A:

  AB
1 1ABC 
2 2DEFG 
3 3HI 
4 4JKL 
5 5MNOP 

[ More Info ]

[/software/office/excel] permanent link

Fri, Jul 28, 2017 5:39 pm

Dovecot not allowing logins to check email

A user reported that she was unable to get her email today and was receiving an error in Outlook when she attempted to download her email. I logged into the email server, which runs Dovecot. I tried establishing a telnet connection to the POP3 port on the server. I was able to successfully connect to the well-known port, TCP port 110, used for POP3 connections. I could then enter the user's username with the user command, but I never received a reponse from the server, i.e. from Dovecot. I eventually had to hit ctrl-], i.e., the Ctrl and "]" keys to return to the shell prompt.

$ telnet 127.0.0.1 110
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
user nell
^]

telnet> quit
Connection closed.
$

[ More Info ]

[/network/email] permanent link

Thu, Jul 27, 2017 10:33 pm

Viewing monitor information on a Windows system with DumpEDID

If you want information, e.g., the manufacturer, model, serial number, maximum resolution, display modes, etc. on a monitor connected to a Microsoft Windows system, you can use the free DumpEDID utility created by Nir Sofer of NirSoft. It's a command-line interface (CLI) utility, so you will need to run it from a command prompt. There's no installation process needed; you can extract the program from the downloaded zip file and then run it. Below is output from the program showing information for an HP S2031 monitor (the manufacturer and model number apear in the Monitor Name line) attached to a system running Windows 10.

C:\Program Files\NirSoft\dumpedid>dumpEDID
DumpEDID v1.06
Copyright (c) 2006 - 2017 Nir Sofer
Web site: http://www.nirsoft.net

*****************************************************************
Active                   : No
Registry Key             : DISPLAY\HWP2904\1&8713bca&0&UID0
Monitor Name             : HP S2031
Serial Number            : 3CQ0311PV2
Manufacture Week         : 31 / 2010
ManufacturerID           : 61474 (0xF022)
ProductID                : 10500 (0x2904)
Serial Number (Numeric)  : 16843009 (0x01010101)
EDID Version             : 1.3
Display Gamma            : 2.20
Vertical Frequency       : 50 - 76 Hz
Horizontal Frequency     : 24 - 83 KHz
Maximum Image Size       : 44 X 25 cm (19.9 Inch)
Maximum Resolution       : 1600 X 900
Support Standby Mode     : No
Support Suspend Mode     : No
Support Low-Power Mode   : Yes
Support Default GTF      : No
Digital                  : No

Supported Display Modes  :
     720 X  400  70 Hz
     640 X  480  60 Hz
     800 X  600  60 Hz
    1024 X  768  60 Hz
    1280 X  720  60 Hz
    1440 X  900  60 Hz
    1280 X 1024  60 Hz
    1600 X  900  60 Hz

*****************************************************************

*****************************************************************
Active                   : No
Registry Key             : DISPLAY\HWP2904\4&2199b20&0&UID16843008
Monitor Name             : HP S2031
Serial Number            : 3CQ0311PV2
Manufacture Week         : 31 / 2010
ManufacturerID           : 61474 (0xF022)
ProductID                : 10500 (0x2904)
Serial Number (Numeric)  : 16843009 (0x01010101)
EDID Version             : 1.3
Display Gamma            : 2.20
Vertical Frequency       : 50 - 76 Hz
Horizontal Frequency     : 24 - 83 KHz
Maximum Image Size       : 44 X 25 cm (19.9 Inch)
Maximum Resolution       : 1600 X 900
Support Standby Mode     : No
Support Suspend Mode     : No
Support Low-Power Mode   : Yes
Support Default GTF      : No
Digital                  : No

Supported Display Modes  :
     720 X  400  70 Hz
     640 X  480  60 Hz
     800 X  600  60 Hz
    1024 X  768  60 Hz
    1280 X  720  60 Hz
    1440 X  900  60 Hz
    1280 X 1024  60 Hz
    1600 X  900  60 Hz

*****************************************************************

C:\Program Files\NirSoft\dumpedid>

[/os/windows/software/utilities/nirsoft] permanent link

Sun, Jul 23, 2017 4:43 pm

Setting the default application for a file extension in Windows 10

When you click on a file in Microsoft Windows, the operating system opens the file with whatever application, if any, that has been set as the default application to open files with the filename extension on the file. The file extension is a dot at the end of the file name followed by a sequence of other characters, often 3 characters, e.g. for myfile.doc, the extension is .doc. If some program has changed the default setting on a file type so that it now opens files with the relevant extension, but you want to revert to the application that previously opened those types of files, you can do so on a Microsoft Windows 10 system by taking the following steps:

  1. Right-click on the Windows Start button, usually in the lower, left-h and corner of the screen, then click on Settings.
  2. From the Settings window, click on Apps.
  3. Click on Default apps.
  4. In the Default apps window, scroll down until you see Choose default apps by file type and click on that text.
  5. Scroll down the list of file types until you see the one for which you wish to change the default application, e.g., .doc.
  6. Click on the the icon for the current default application shown to the right of the file type. You will then be able to choose another application to become the default application for opening files of that type, e.g., Microsoft Word for .doc files.
  7. You can then close the Settings window by clicking on the "X" at the upper, right-hand corner of the window.

[ More Info ]

[/os/windows/win10] permanent link

Sat, Jul 22, 2017 5:53 pm

Counting entries in an Excel spreadsheet by AM or PM

Microsoft Excel supports formatting timestamps in a workbook as a date followed by a time with an AM or PM value, i.e., the times are in 12-hour clock format where noon is 12:00 PM and midnight is 12:00 AM. You can select that format for a cell or column in a worksheet by highlighting the cell(s) or column (a column can be selected by clicking on the letter at the top of the column) and then clicking on Format then Cells and then clicking on Date and selecting a type of "3/14/15 1:30 PM."

If you wanted to extract just the hour from the timestamp, you can use the HOUR function, e.g. =HOUR(A1) to extract the hour value from cell A1. The hour will be displayed in 24-hour clock format, aka military time, i.e., 7:00 AM is 7 while 7:00 PM is 12 plus 7, i.e., 19; 12:00 AM (midnight) is 0 and 12:00 PM (noon) is 12.

[ More Info ]

[/software/office/excel] permanent link

Thu, Jul 20, 2017 10:49 pm

Passing a parameter to a Python script from a web page

I have a Python script that I use to process a copy of a webpage downloaded from a website and stored on my MacBook Pro laptop's hard drive to produce a CSV file from the data within that file. I was running the script from a command-line interface (CLI), i.e., a Terminal window, on the system by issuing a command like ./myscript.py inputfile outputfile where inputfile and outputfile were the file names and locations of the file holding the data and the output CSV file, respectively. I wanted to execute that script from a link on a web page, instead, so I needed a way to pass the arguments I had been passing on the command line to the Python script in the URL that I'd specify as the link on the web page. One way that you can do that for Python is explained at [Tutor] Passing Arguments to a Remote CGI Script where the following sample Python script is shown:

###
"""test.cgi  --- a small CGI program to show how one can pass parameters.
"""

import cgi
fs = cgi.FieldStorage()

print "Content-type: text/plain\n"
for key in fs.keys():
    print "%s = %s" % (key, fs[key].value)
###

[ More Info ]

[/languages/python] permanent link

Wed, Jul 19, 2017 9:55 pm

OS X - Get File Info

On an OS X/macOS system, you may be able to determine a file's origin, i.e., where it was downloaded from, by right-clicking on the file, or clicking on it to highlight it and then hitting command-I (the command and "I" keys), in the Finder and choosing Get Info. If a "where from" field is displayed, you can see the URL from which the file was obtained if it was downloaded from a website. You can also view that information from a command-line interface (CLI), e.g., a Terminal window, using the mdls command.

[ More Info ]

[/os/os-x] permanent link

Tue, Jul 18, 2017 10:53 pm

DB Browser for SQLite upgrade to version 3.9.1 on Mac OS X

I upgraded the version of DB Browser for SQLite on my MacBook Pro today to the latest version, 3.9.1v2. Before upgrading, I had version 3.8.0 on the system. When I checked the version from a command line interface, i.e., a Terminal window, using the system_profiler command, I didn't find any references to the program when I searched for "SQLite:", but I saw the version number listed for "sqlitebrowser."

$ system_profiler SPApplicationsDataType | grep -i "SQLite:" -A 2
$ system_profiler SPApplicationsDataType | grep -i "Browser:" -A 2
    sqlitebrowser:

      Version: 3.8.0
$ system_profiler SPApplicationsDataType | grep -i "sqlitebrowser" -A 2
    sqlitebrowser:

      Version: 3.8.0
--
      Location: /Applications/sqlitebrowser.app
      Get Info String: DB Browser for SQLite

$

[ More Info ]

[/software/database/sqlite/db_browser] permanent link

Sun, Jul 16, 2017 6:54 pm

ELOG cannot open /etc/elogd.cfg error

When I attempted to add a new entry with a new category to an ELOG logbook on a Linux system, I saw the error message below:

Cannot open file /etc/elogd.cfg: Permission denied
Please use your browser's back button to go back

I checked the file permissions on the elogd.cfg configuration file and saw the following:

# ls -l /etc/elogd.cfg
-rw-r--r--. 1 root root 785 Jul 16 14:47 /etc/elogd.cfg
#

So only the root account had write access to the file. I then checked to see which account elogd was running under. The program lisens on port 8080 on that system. If you don't know the port that is being used for ELOG, you can find it in the /etc/elogd.cfg file. E.g.:

[global]
port = 8080

[ More Info ]

[/network/web/blogging/elog] permanent link

Sat, Jul 15, 2017 10:51 pm

Burning a CD/DVD on a Linux system with the cdrecord command

If you need to burn a CD or DVD from an ISO file from the command line on a Linux system, you can use the cdrecord command. If you include the -v argument to the program, you will see verbose information on the actions performed by the utility and the progress as it writes to the optical disc. When the program is finished you can use the eject command to eject the disc.

[ More Info ]

[/os/unix/linux/utilities/cd-dvd] permanent link

Fri, Jul 14, 2017 9:49 pm

Checking on whether email has gone to the spam folder and whitelisting in Gmail

If you suspect email that you wished to receive in the Inbox for your Gmail account has, instead, gone to the Spam folder, there are several ways to check the Spam folder in Gmail. If email you do want to read has gone into that folder, you can whitelist email from a particular sender or domain to ensure that future email from the sender(s) won't be routed to the Spam folder instead of the Inbox.

[/network/email/gmail] permanent link

Thu, Jul 13, 2017 11:00 pm

Unbanning an IP address banned with fail2ban

I needed to remove an IP address from the "jail" it was placed in by fail2ban, which is intrusion prevention sotware, due to an incorrect password being entered too many times by a legitimate user of the system during attempts to log into a CentOS Linux system that runs fail2ban. The attempted logins were made via Secure Shell (SSH). After the number of attempts with an incorrect password reached the cutoff for fail2ban to automatically ban the IP address from which the login attempts were originating, the user then got the following error message on subsequent login attempts:

$ ssh jdoe@example.com
ssh: connect to host example.com port 22: Connection refused
$

The fail2ban log on the system is at /var/log/fail2ban.log. You can check that log to see which IP addresses were banned and the time any bans went into effect. So I first verified the IP address from which the login attempts were made.

# tail -n 3 /var/log/fail2ban.log
2017-07-13 21:59:06,304 fail2ban.filter         [1664]: INFO    [sshd] Found 192.168.1.21
2017-07-13 21:59:06,818 fail2ban.actions        [1664]: NOTICE  [sshd] Ban 192.168.1.21
2017-07-13 21:59:11,538 fail2ban.filter         [1664]: INFO    [sshd] Found 192.168.1.21
#

You can determine the name for the jail and IP address is in by issuing the command fail2ban-client status.

[ More Info ]

[/os/unix/linux] permanent link

Mon, Jul 10, 2017 10:47 pm

Viewing Partition Information on a Windows System

One way to see how disks are partitioned on a Microsoft Windws system is to view the information using Disk Management. You can start the utility from a command prompt with administrator privileges by typing diskmgmt.msc. That will provide a graphical display of the partitions on the drives in the system and externally attached to the system.

Another method is to use the diskpart command, which can be run from a command prompt - obtain a command prompt with administrator privileges. You can obtain help on using the utility by typing help at the DISKPART prompt.

[ More Info ]

[/os/windows/commands] permanent link

Sun, Jul 09, 2017 10:36 pm

exiv2

If you want to determine the size of an image file on a Linux system, for some types of image files, e.g., PNG or GIF files, you can just use the file command. E.g.:

$ file ~/Documents/System_Memory.png
/home/jdoe/Documents/System_Memory.png: PNG image data, 800 x 600, 8-bit/color RGBA, non-interlaced
$ file ~/Documents/recipes/asparagus-strawberry-salad.gif
/home/jdoe/Documents/recipes/asparagus-strawberry-salad.gif: GIF image data, version 89a, 250 x 153
$

But if you obtain information on a JPG/JPEG file with that command, it doesn't provide any information on the dimensions of the image.

$ file ~/Documents/Winter.jpg
/home/jdoe/Documents/Winter.jpg: JPEG image data, JFIF standard 1.02
$

If you install the exiv2 package, you can also display the dimensions of JPEG images as well as PNG, GIF, and other image formats.

$ exiv2 /home/jdoe/Documents/Winter.jpg
File name       : /home/jdoe/Documents/Winter.jpg
File size       : 105542 Bytes
MIME type       : image/jpeg
Image size      : 800 x 600
/home/jdoe/Documents/Winter.jpg: No Exif data found in the file
$ exiv2 /home/jdoe/Documents/System_Memory.png
File name       : /home/jdoe/Documents/System_Memory.png
File size       : 135335 Bytes
MIME type       : image/png
Image size      : 800 x 600
/home/jdoe/Documents/System_Memory.png: No Exif data found in the file
$ exiv2 /home/jdoe/Documents/recipes/asparagus-strawberry-salad.gif
File name       : /home/jdoe/Documents/recipes/asparagus-strawberry-salad.gif
File size       : 31346 Bytes
MIME type       : image/gif
Image size      : 250 x 153
/home/jdoe/Documents/recipes/asparagus-strawberry-salad.gif: No Exif data found in the file
$

[ More Info ]

[/os/unix/programs/graphics] permanent link

Sat, Jul 08, 2017 10:57 pm

Finding files modified today

On Unix-like operating systems, such as Linux or OS X/macOS system, you can use the find command to locate files based on specified criteria. If you want to see just those files modified within the last day, you can use a command such as the one below:
$ find /home/jdoe/Documents -mtime -1 -type f -print

The command above would list those files created within the /home/jdoe/Documents directory and its subdirectories that were created in the last day, which is specified with -mtime -1. The mtime references a file's modification time and the minus one indicates you only want to see those files created today; -type f indicates you are only interested in files, not directories or other objects while -print indicates you want find to display the names of the files it finds that match the specified criteria. Note: this method will show files created within the last 24 hours, not just those created since the start of the current day at midnight the previous night. An alternative method, to see just those files created or modified since the beginning of the current day, is to specify today's date with -newermt. E.g., if today is July 8, 2017, I could use the command below to find files with a modification time newer than the specified date:

$ find /home/jdoe/Documents -newermt 2017-07-08 -type f

That command will also show me the files in the specified directory that were created or modified today.

References:

  1. Find man page for Linux (Centos 7)
  2. Find man page for OS X (Yosemite)

Related posts:

  1. Finding files modified on or after a date on a Linux system
    Date: January 11, 2015

[/os/unix/commands] permanent link

Fri, Jul 07, 2017 10:46 pm

Printing the error encountered with Python

In a Python script I was calling from a webpage residing on an Apache webserver, I was unable to copy a file whose location and file name were stored in the variable countfile to another file whose name and location were stored in the variable backupfile with any of the following lines of code:

shutil.copy(countfile, backupfile)
shutil.copy2(countfile, backupfile)
shutil.copyfile(countfile, backupfile)

The backup file should be stored in the same directory as countfile using the same name, but with ".bak" appended to the file name. I wasn't able to identify the cause of the problem when I just used except to print my own error message with the code below, since all I would see in the output was "Error! Unable to make a backup copy of the input file."

import shutil

backupfile = countfile + ".bak"

try:
   # Make a backup copy of the prior file
   shutil.copy(countfile, backupfile)
except e:
   print "Error! Unable to make a backup copy of the input file."
   sys.exit(1)

But the explicit Python error message can be obtained by using except Exception, e as shown below:

try:
   shutil.copy(countfile, backupfile)
except Exception,e:
   print str(e)
   print "Error! Unable to make a backup copy of the input file."
   sys.exit(1)

When I used that code, instead, I saw the following output for the error, which showed that the problem was with the creation of the backup file:

[Errno 13] Permission denied: '/Users/jasmith1/Documents/www/SGRS/data/SGRS_Count.csv.bak'
Error! Unable to make a backup copy of the input file.

[ More Info ]

[/languages/python] permanent link

Tue, Jul 04, 2017 10:47 pm

Determining the model and serial number of a HDD in a Linux system

If you need to know the model number and/or serial number of a hard disk drive (HDD) in a Linux system, one tool that you can use to obtain that information as well as other information on the drive is the lsblk utility, which is included in the util-linux package. E.g.:

# lsblk -o MODEL,SERIAL,SIZE,STATE --nodeps
MODEL            SERIAL            SIZE STATE
WDC WD10EZEX-00W WD-WCC6Y4ZYE4Y3 931.5G running
DVD A  DH16ACSHR 238229911623     1024M running
vmDisk-CD        13043003455      1024M running

You can see the list of arguments you can provide to the program with lsblk -h.

[ More Info ]

[/os/unix/linux/utilities/sysmgmt] permanent link

Mon, Jul 03, 2017 10:03 pm

is_null versus empty in PHP

I have a PHP script that queries an SQLite database displaying the results on a web page. There are two fields, "EC Link" and "Configs Link" in the database that can contain URLs pointing to documentation on another server, but sometimes there is no URL in the database for those fields. If there is a URL, I want to display a clickable "EC" and "Configs" links. If there is no URL in either field, I want to simply display the text, but without it being clickable to indicate that there is no URL in the database table. I was using "is_null" for that purpose as shown below:

   if (is_null($row['EC Link'])) {
       echo "EC | ";
    }
    else {
       echo "<a href=\"" . $row['EC Link'] . "\">EC</a> | ";
    }
    if (is_null($row['Configs Link'])) {
       echo "Configs | ";
    }
    else {
       echo "<a href=\"" . $row['Configs Link'] . "\">Configs</a> | ";
    }

But I found that sometimes I was seeing clickable links even though there was no URL for the EC and/or Configs documentation for a particular record in the database. When I checked the records in the relevant table in the database, I found that the fields were blank, i.e., there was no data in them, but they weren't marked as null. So, to allow for the values being either null or blank, I used an empty, instead of is_null, test.

[ More Info ]

[/languages/php] permanent link

Sun, Jul 02, 2017 11:07 pm

SUPERAntispyware Found Ask Toolbar on 2017-07-02

I scanned a Windows 10 system used by a family member on July 2, 2017 with SUPERAntispyware Free Edtion, since the system was responding more slowly than I expected even for simple actions, though the system has other antivirus software on it. The first thing that SUPERAntispyware identified was the Ask Toolbar browser extension. It showed the following information for Ask Toolbar:

Ask Toolbar

C:\ProgramData\ASKPARTNERNETWORK\TOOLBAR
HKLM\SYSTEM\CurrentControlSet\services\APNMCP
HKCU\Software\AskPartnerNetwork\Toolbar
C:\ProgramData\ASKPARTNERNETWORK

[ More Info ]

[/security/scans] permanent link

Sat, Jul 01, 2017 9:38 pm

Check the scheduled backup for the Windows 10 backup program

You can check the schedule for backups with the backup program that is included with Windows 10 by taking the following steps:
  1. Right-click on the Windows Start button.
  2. Select Control Panel.
  3. Select System and Security.
  4. Double-click on Backup and Restore (Windows 7). You will see the scheduled backup dates in the "Schedule" line, e.g., "Every Sunday at 2:00 AM."

[ More Info ]

[/os/windows/win10] permanent link

Once You Know, You Newegg AliExpress by Alibaba.com

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo