MoonPoint Support Logo

 

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



Advanced Search
November
Sun Mon Tue Wed Thu Fri Sat
         
2015
Months
Nov


Mon, Nov 30, 2015 9:54 pm

Fix for 802.1X authentication failing after password change

I changed my password for a MacBook Pro laptop running OS X 10.8.5. After I did so, since the password is also used for 802.1X authentication for a work wireless network, that authentication was failing. I would see "Authenticating" for a long time and then, eventually, a message indicating that the system couldn't join the relevent wireless network because "A connection timeout occurred." I was never prompted to provide a new password for authenticaion. I was able to fix the problem, by opening the Keychain Access utility found in Applications/Utilities then selecting Passwords from the Category list in the left pane of the Keychain Access window. In the right pane, I saw several entries for the wireless network identified as "802.1X Password" for Kind in the "login" Keychain. All but the top one had "WPA:" at the beginning of the Name. I selected the top one, though, because the Date Modified field for it contained "Today" whereas all of the other entries had a date value of Aug 14, 2013. When I double-clicked on the top entry with the modification date of today, another window opened with Name, Kind, Account, Where, and Comments fields under the Attributes tab. There was also a check box for "Show password". When I checked that box, a window opened stating "Keychain Access wants to use your confidential information..." requesting the "login" keychain pasword. I provided that password and clicked on the Allow button. I was then able to view the current 802.11X password and change the password for the 802.11x authentication to the wireless network. After clicking on Save Changes. I was then able to successfully complete the 802.1X authentiction seeing an "Authenticated via PEAP (MSCHAPv2) message in the System Preferences Network window.

[/os/os-x] permanent link

Mon, Nov 23, 2015 9:49 pm

Determining software versions from the command line

If you want to know which version of an application is installed on a Mac OS X system you can do so from within the GUI using the About option. E.g., in the Safari web browser you can click on Safari and select About Safari. You can also determine the version of applications installed on an OS X system by clicking on the Apple icon in the upper, left-hand corner of the screen then selecting About This Mac, then More Info, then System Report, then Software, and then clicking on Applications beneath Software as shown at Determining the version of the OS and applications under OS X.

However, if you wish to determine the version of an application from a command line interface (CLI), aka a shell prompt, which you can get using the Terminal application found in Applications/Utilities you can use the command system_profiler SPApplicationsDataType. If you pipe the output of the command to the more command you can page through the list that is output by hitting the space bar when the colon (:) prompt is displayed.

Jony Ive:
The Genius
Behind Apple's
Greatest Products
$ system_profiler SPApplicationsDataType | more
Applications:

    Microsoft Lync:

      Version: 14.2.1
      Last Modified: 10/2/15 8:52 PM
      Kind: Intel
      64-Bit (Intel): No
      App Store: No
      Get Info String: 14.2.1 (150923), © 2010 Microsoft Corporation. All rights reserved.
      Location: /Applications/Microsoft Lync.app

    Junos Pulse:

      Version: 5.0
      Last Modified: 4/17/14 4:27 PM
      Kind: Intel
      64-Bit (Intel): No
      App Store: No
      Location: /Applications/Junos Pulse.app

    Microsoft Database Utility:

      Version: 13.1.6
:

If you are interested in the version of a particular program, such as Safari, you can use the grep utility to search for the application name followed by a colon and then after grep display the two lines that appear after it finds a match. E.g.:

$ system_profiler SPApplicationsDataType | grep -A 2 "Safari:" 
    Safari:

      Version: 6.2.8

If you just want to see the version number as output, you can pipe the output of the above command to the cut utility, instructing it to display the string that starts in column 16 of the line that contains "Version" as shown below. The -c 16- parameter instructs cut to display characters from column 16 to the end of the line.

$ system_profiler SPApplicationsDataType | grep -A 2 "Safari:" | grep "Version:" | cut -c 16-
6.2.8
$ system_profiler SPApplicationsDataType | grep -A 2 "Junos Pulse:" | grep "Version:" | cut -c 16-
5.0

[/os/os-x] permanent link

Sun, Nov 22, 2015 8:43 pm

Viewing accounts that have access to a MySQL or MariaDB database

If you wish to know which accounts have access to a MySQL or MariaDB database, you can use the command select user from mysql.db where db='dbname'; where dbname is the name of the relevant database. E.g., if I want to view access to the Abc database, I can use the command below while logged into the MySQL/MariaDB DBMS as root (you can log in using the MySQL/MariaDB root account with mysql -u root -p):
MariaDB [(none)]> select user from mysql.db where db='Abc';
Empty set (0.00 sec)
MariaDB [(none)]>

In the above example, no accounts have been granted access to the database. If I want to grant all types of access to the abcsales1 account to all tables in the database, I can use the command shown below:

MariaDB [(none)]> GRANT ALL on Abc.* to 'abcsales1'@'localhost';
Query OK, 0 rows affected (0.04 sec)

MariaDB [(none)]> select user from mysql.db where db='Abc';
+-----------+
| user      |
+-----------+
| abcsales1 |
+-----------+
1 row in set (0.00 sec)

MariaDB [(none)]>

Bear in mind that the select user from mysql.db where db='dbname'; will only show users who have database-level access to the database named dbname. It is possible that an account can have access at the table, column, or proc level rather being granted access at the database level. To check for those access levels of access as well as database-level acess, use all of the commands below substituting the name of the database for dbname:



SELECT user,host FROM mysql.db WHERE db='dbname';
SELECT user,host FROM mysql.tables_priv WHERE db='dbname';
SELECT user,host FROM mysql.columns_priv WHERE db='dbname';
SELECT user,host FROM mysql.procs_priv WHERE db='dbname';

E.g.:

MariaDB [(none)]> SELECT user,host FROM mysql.db WHERE db='Abc';
+-----------+-----------+
| user      | host      |
+-----------+-----------+
| abcsales1 | localhost |
+-----------+-----------+
1 row in set (0.00 sec)

MariaDB [(none)]> SELECT user,host FROM mysql.tables_priv WHERE db='Abc';
Empty set (0.00 sec)

MariaDB [(none)]> SELECT user,host FROM mysql.columns_priv WHERE db='Abc';
Empty set (0.00 sec)

MariaDB [(none)]> SELECT user,host FROM mysql.procs_priv WHERE db='Abc';
Empty set (0.00 sec)

MariaDB [(none)]>

References:

  1. how to know all users that can access certain database (mysql)?
    Asked: April 28, 2011
    Server Fault
  2. Managing database access with MariaDB or MySQL
    Date: July 17, 2015
    MoonPoint Support

[/software/database/mysql] permanent link

Sat, Nov 21, 2015 11:05 pm

Icns files

Icns files are used on Mac OS X systems to store icons for applications. The icns files end with a .icns extension. An icns file can store multiple icons within itself. The Apple Icon Image format used for the files supports icons of 16 × 16, 32 × 32, 48 × 48, 128 × 128, 256 × 256, 512 × 512, and 1024 × 1024 pixels in size. OS X can scale the fixed-size icons to be displayed at any intermediate size. You can view the icons stored within a .icns file on an OS X system using the Preview program found in the Applications directory.

[ More Info ]

[/os/os-x] permanent link

Fri, Nov 20, 2015 10:28 pm

SymDaemon high CPU Usage

The performance of a MacBook Pro laptop running OS X 10.8.5, aka "Mountain Lion", that I've been using was very poor today and the fan was making much more noise than usual. When I used top -o cpu and the Activity Monitor to check which process was causing the problem, I found that the Symantec SymDaemon process was the culprit. After I killed that process, performance improved considerably, the fan noise subsided and when I compared the CPU temperature before and after stopping the process with osx-cpu-temp, I found the CPU was considerably cooler afterwards. Likewise, when I checked the fan speed with smcFanControl before and aftwards, I found that smcFanControl showed the fans to be running considerably slower after the process was stopped.

[ More Info ]

[/os/os-x] permanent link

Fri, Nov 13, 2015 9:54 pm

Netsh show networks

To view the available WiFi networks from a Microsoft Windows system from a command line interface (CLI), enter the netsh wlan show networks command at a command prompt.
C:\users\jane>netsh wlan show networks

Interface name : Wireless Network Connection 5
There are 3 networks currently visible.

SSID 1 : ARRIS-0142
    Network type            : Infrastructure
    Authentication          : WPA2-Personal
    Encryption              : CCMP

SSID 2 : BY7VQ
    Network type            : Infrastructure
    Authentication          : WPA2-Personal
    Encryption              : CCMP

SSID 3 : 30F5A9
    Network type            : Infrastructure
    Authentication          : WPA2-Personal
    Encryption              : CCMP

You can view the signal strength for a wireless connection from the system using netsh wlan show interfaces.

C:\users\jane>netsh wlan show interfaces

There is 1 interface on the system:

    Name                   : Wireless Network Connection 5
    Description            : TP-LINK 450Mbps Wireless N Adapter
    GUID                   : 55a96587-9163-4f0a-a2c0-2f16705bea60
    Physical address       : c4:e9:84:15:d6:e4
    State                  : connected
    SSID                   : ARRIS-0142
    BSSID                  : 94:87:7c:03:01:40
    Network type           : Infrastructure
    Radio type             : 802.11n
    Authentication         : WPA2-Personal
    Cipher                 : CCMP
    Connection mode        : Auto Connect
    Channel                : 11
    Receive rate (Mbps)    : 216.7
    Transmit rate (Mbps)   : 216.7
    Signal                 : 32%
    Profile                : ARRIS-0142

    Hosted network status  : Not started

For the above Wi-Fi connection, the signal strength is fair at best with a strength of only 32%.

[/os/windows/commands] permanent link

Wed, Nov 11, 2015 8:49 pm

Searching for online copies of an image

If you have an image on your computer or find one online and want to know locations where that image appears on web sites, you can use the TinEye site or Google Images. Both sites allow you to upload an image or provide a URL for an online location for an image. The services will then return a list of all the locations where the image or similar images were found.

[ More Info ]

[/network/web/search] permanent link

Tue, Nov 10, 2015 10:29 pm

Junos Pulse Failed to Connect

On Friday the Juniper Networks Junos Pulse client software I use to connect to a work VPN stopped working on my MacBook Pro running OS X 10.8.5, aka "Mountain Lion". After the problem first occurred, whenever I started the Junos Pulse program which is at version 5.0.3, I would see a window with no connections listed whereas previously I would see the work VPN connection with a Connect button to the right of it. When I tried adding the prior VPN connection again, I would receive a "Failed to connect to the Juniper Unified Network Service" error message. Today was the first day I had to spend any significant amount of time troubleshooting the problem. I was able to resolve the problem using commands that had worked previously with another Junos Pulse VPN client problem.

[ More Info ]

[/os/os-x] permanent link

Wed, Nov 04, 2015 9:21 pm

Determining what application will open a file from the command line

If you wish to know what application will open a particular file type on a Microsoft Windows system, you can obtain that information from the command line using the ftype command.

c:\>ftype /?
Displays or modifies file types used in file extension associations

FTYPE [fileType[=[openCommandString]]]

  fileType  Specifies the file type to examine or change
  openCommandString Specifies the open command to use when launching files
                    of this type.

Type FTYPE without parameters to display the current file types that
have open command strings defined.  FTYPE is invoked with just a file
type, it displays the current open command string for that file type.
Specify nothing for the open command string and the FTYPE command will
delete the open command string for the file type.  Within an open
command string %0 or %1 are substituted with the file name being
launched through the assocation.  %* gets all the parameters and %2
gets the 1st parameter, %3 the second, etc.  %~n gets all the remaining
parameters starting with the nth parameter, where n may be between 2 and 9,
inclusive.  For example:

    ASSOC .pl=PerlScript
    FTYPE PerlScript=perl.exe %1 %*

would allow you to invoke a Perl script as follows:

    script.pl 1 2 3

If you want to eliminate the need to type the extensions, then do the
following:

    set PATHEXT=.pl;%PATHEXT%

and the script could be invoked as follows:

    script 1 2 3

If you open a command prompt window and type ftype with no options, you will see all the file associations for the system on which the command is run, i.e., which applications will open particular file formats. You can pipe the output of the command into the more command to page through the information using the space bar or redirect the output to a file with ftype > somefile.txt.


c:\>ftype | more
Access=C:\Program Files\Microsoft Office 15\Root\Office15\protocolhandler.exe "%
1"
Access.ACCDAExtension.15=C:\Program Files\Microsoft Office 15\Root\Office15\MSAC
CESS.EXE /NOSTARTUP "%1"
Access.ACCDCFile.15="C:\Program Files\Microsoft Office 15\Root\Office15\MSACCESS
.EXE" /NOSTARTUP "%1"
Access.ACCDEFile.15="C:\Program Files\Microsoft Office 15\Root\Office15\MSACCESS
.EXE" /NOSTARTUP "%1" %2 %3 %4 %5 %6 %7 %8 %9
Access.ACCDRFile.15="C:\Program Files\Microsoft Office 15\Root\Office15\MSACCESS
.EXE" /RUNTIME "%1" %2 %3 %4 %5 %6 %7 %8 %9
Access.ACCDTFile.15="C:\Program Files\Microsoft Office 15\Root\Office15\MSACCESS
.EXE" /NOSTARTUP "%1"
Access.ADEFile.15="C:\Program Files\Microsoft Office 15\Root\Office15\MSACCESS.E
XE" /NOSTARTUP "%1" %2 %3 %4 %5 %6 %7 %8 %9
Access.Application.15="C:\Program Files\Microsoft Office 15\Root\Office15\MSACCE
SS.EXE" /NOSTARTUP "%1" %2 %3 %4 %5 %6 %7 %8 %9
Access.BlankDatabaseTemplate.15="C:\Program Files\Microsoft Office 15\Root\Offic
e15\MSACCESS.EXE" /NOSTARTUP /NEWDB "%1"
Access.BlankProjectTemplate.15="C:\Program Files\Microsoft Office 15\Root\Office
15\MSACCESS.EXE" /NOSTARTUP /NEWDB "%1"
Access.Extension.15=C:\Program Files\Microsoft Office 15\Root\Office15\MSACCESS.
EXE /NOSTARTUP "%1"
Access.MDBFile="C:\Program Files\Microsoft Office 15\Root\Office15\MSACCESS.EXE"
 /NOSTARTUP "%1" %2 %3 %4 %5 %6 %7 %8 %9
-- More  --

You might think that you could just type ftype ext, where txt is a 3-letter extension, e.g., ftype docx, to determine what application will open a file with a .docx extension, but that won't work.

c:\>ftype docx
File type 'docx' not found or no open command associated with it.

c:\>ftype txt
File type 'txt' not found or no open command associated with it.

You will need to know that a .txt file is identified as a "textfile" and a .docx file, which is an Office Open XML file format, is identified as a "docxfile" for that method to work, but you can use just the 3-letter extension, if you pipe the output of the ftype command to the find command as shown below:

c:\>ftype | find "txt"
txtfile=%SystemRoot%\system32\NOTEPAD.EXE %1

c:\>ftype | find "docx"
docxfile="%ProgramFiles%\Windows NT\Accessories\WORDPAD.EXE" "%1"

From the above output, I can see that the Windows Notepad application is the default program for opening text files, i.e., the program that will open any file with a .txt extension if I double-click on the file in the Windows Explorer. And I can see that the Windows Wordpad, aka Write, program will open .docx files by default.

[/os/windows/commands] permanent link

Tue, Nov 03, 2015 9:54 pm

Converting audio/video files to another format with VLC

The free and open-source (FOSS) VLC program can be used to convert audio and video files from one format to another. VLC is a cross-platform, audio/video (A/V) program that is available for Microsoft Windows, Mac OS X, Android, and iOS systems.

VLC originated as an academic project in 1996. It was rewritten from scractch in 1998 and released under the GNU General Public License (GPL) in 2001 - see the Wikipedia article VLC media player for further details on the development history for the application.

Steps for converting a file from one format to another, e.g., a FLAC audio file to an MP3 audio format are provided here.

[/software/audio_video/VLC] permanent link

Sun, Nov 01, 2015 4:09 pm

Running a Python script on an Apache web server

If you attempt to run a Python script on a web page on an Apache web server and see only the Python code displayed, then you may need to create a ScriptAlias directive in Apache's http.conf configuration file and restart the Apache webserver. If you see an "Internal Server Error" displayed when the script is being called by Apache on a Unix/Linux system, but the code is correct, then you may need to assign execute permission to the file so that Apache can run the script. You also need to be sure the script contains a line at the beginning of the file that provides the location of Python on the system.

[ More Info ]

[/languages/python] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo