Friday, December 29, 2017

set readynas nfs rootsquash off


rootsquash is a feature in NFS that allows one to add a bit of security to nas systems.  Unfortunately if the user id's aren't managed closely across your systems that give a crap, the systems will have inadvertent portions that aren't available.

The readynas backup is a victim of this.  It faithfully copies across things from one system to another and adjusts times and all, and sets the user id.  Then it can no longer get to it after that.

Sad solution is to turn off rootsquash, so that the actual rsyncs from other systems can get to the files and do the job.

Will have to work on the mess sometime.  However there are not any conventions on user id's across all the distributions to make anything simple.

https://kb.netgear.com/000045496/ReadyNAS-OS-6-8-NFS-User-ID-Mapping

ReadyNAS OS 6.8 allows configuring NFS User ID mapping per NFS share. This functionality ensures NFS connections use a predefined UID/GID when necessary, which prevents permission based issues on certain applications.

Configuring User ID Mapping

  1. From the Admin Page, click Shares > Shares
  2. Click the share you would like to edit, then click Settings.
  3. Click Network Access > NFS > Advanced.
There are three UID/GID squashing settings:
  • No Root Squash: Allows NFS connection using root access to connect as root. (Anonymous UID/GID text boxes are disabled)
  • Root Squashing: Forces all NFS root users to use UID/GID configured in the Anonymous UID/GID text boxes.
  • All Squash: Forces all NFS users to use UID/GID configured in the Anonymous UID/GID text boxes.
  •  

Friday, December 15, 2017

Firefox studies, disabling along with reporting bug dumps.


Firefox has two options that should be off for full privacy.

One is to allow Firefox to send dumps to Mozilla.  I've no idea if anyone looks at this, but a dump may sweep up enough information to discern your browser history and other items, such as deciphered items which have used your private key to authenticate a site, etc.

The other one which blew up today, is to "allow Firefox to perform studies".  This was abused 12/15/2017 (though not sure what version) to load a useless extension during an update.  This is possibly harmless today (and useless crap to load if you don't use it), and potentially useful if your browser is being compromised to add something to spy on you or otherwise mess with your system.

The extension was able to be installed if you had the "Firefox Studies" checkbox selected. To prevent Firefox Studies from installing extensions on your behalf:
  • Navigate to: "about:preferences#privacy"
  • Scroll down to the "Firefox Data Collection and Use" section
  • Uncheck the "Allow Firefox to install and run studies" checkbox (and the others, if you wish)
 
This gets rid of the studies problem.  Also uncheck the other options there while you are at it.

Tuesday, December 12, 2017

Older version of 32 bit Firefox

Location of older firefox (version 53) which runs with the Foscam Cameras.

https://ftp.mozilla.org/pub/firefox/releases/53.0.3/win32/en-US/

One can open adobe flash type extensions, of which the foscam web assistant is one.

Wish they'd publish a pure javascript support replacement.


Monday, November 13, 2017

suppress updates on Firefox

On Firefox 54, updates are loaded to

C:\Users\jws\AppData\Local\Mozilla\updates

Erasing any directory there will stop it from updating.

about:preferences#advanced

about:preferences -> advanced -> updates should be set "never check for updates" as well

This may be necessary for various updates, which are being added to Firefox which are screwing things up.  Not sure if and when it will stabilize, so freezing updates become necessary.

Here is a further bit of info on downgrading if the updates happen anyway.

Note that from Server  2003, which is similar to XP to later versions, which have a C:\user directory, and stores profiles there, the updates are not present in the profiles directory.  Where they are, is still not known.

https://www.wikihow.com/Downgrade-Firefox

1
Go to the Firefox install guide. This page has information on how you can download an old version of Firefox. Since the link to access the page with old versions of Firefox is constantly updated, you'll have to access it from this page.

2
Scroll down to the "I still want to downgrade" section. It's about halfway down the page. 
 
Click Directory of other versions and languages. This link is below the yellow Firefox warning box that's in the "I still want to downgrade" section. Clicking it will take you to a list of all Firefox versions.  

4
Select a version number. Click a number on this page to go to the download page for that version of Firefox.
  • For example: you would click 45.1.0esr/ to go to the download page for Firefox version 45.1.0.
 
5
Select your operating system's folder. Since the folders here aren't clearly labeled, here's how to identify your operating system's folder:
  • Windows - Look for "win32/" (32-bit Windows) or "win64/" (64-bit Windows) in the link text. If you don't know your computer's bit number, check it first.
  • Mac - Look for "mac/" in the link text.
 
6
Select the language folder. The list on this page is abbreviated regional languages. Select the one that matches your region. For example, if you speak English and are in the United States, you would click the "en-US/" folder. 
 
7
Click the download link. This will prompt your selected version of Firefox to begin downloading to your computer.
  • Depending on your browser settings, you may be prompted to confirm the download or select a location to save to before the download will begin.
 
8
Double-click the Firefox setup file. Once the download has finished, double-click the setup file to begin the installation process. On Windows, this will be an application (EXE) file, while Mac users will double-click the Firefox DMG file.
  • On a MacOS Sierra and later, you may have to manually allow the installation before continuing.
  • On Windows, you may be prompted to click Extract all first. If so, click Extract all, then open the extracted (non-ZIP) folder and double-click the Firefox application again.
 
9
Select your add-ons if prompted. Depending on the version of Firefox you're using, you may have the option of continuing to use some or all of your add-ons. 
 
10
Wait for Firefox to open. Once Firefox opens, you will be using the version that you selected. 
 
 
 
 
 
 

30

Saturday, November 11, 2017

save and restore of putty session definitions from machine to machine

Putty sessions are saved in the registry entries for the Putty application.   That entry for the user must be backed up and restored to transfer the session information between machines.

Saving:
This incantation will back up the registry entries for a user to a file.

regedit /e "%userprofile%\desktop\putty-registry.reg" HKEY_CURRENT_USER\Software\Simontatham

The "manufacturer is "Simontatham" and is the same on all machines.

This saves the session entries in a Desktop file putty-registry.reg

File names on machine on restore (Merge):
In each Session entry there will be a location for any sessions which have a key file set for SSH preshared key.  It is not a good idea to save and transfer the preshared keys between machines, unless they are ones you have generated, and know what you are doing.

"PublicKeyFile" will be the path to the preshared key, and will need to point at the location for the preshared private key file on the new machine.  This should be done before merging and restoring onto the machine.

Restore (Merge):
This incantation will allow one to restore them on another machine.

The saved file will need to be located on a drive with a drive letter.  Otherwise the restore will not work.  Copying the putty-registry.reg file back to the new machine Desktop would be a good way to ensure this (it will be on C:).

Double clicking on the reg file once transferred to the other machine will restore those registry keys, and they should appear on the next invocation of putty.

You can also run regedit (from the run feature of the start menu) and select to import the file.

https://www.cyberciti.biz/tips/putty-session.html

stackoverflow article method here

Export

cmd.exe, require elevated prompt:

Only sessions:
regedit /e "%USERPROFILE%\Desktop\putty-sessions.reg" HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions
All settings:
regedit /e "%USERPROFILE%\Desktop\putty.reg" HKEY_CURRENT_USER\Software\SimonTatham

Powershell:

Only sessions:
reg export HKCU\Software\SimonTatham\PuTTY\Sessions ([Environment]::GetFolderPath("Desktop") + "\putty-sessions.reg")
All settings:
reg export HKCU\Software\SimonTatham ([Environment]::GetFolderPath("Desktop") + "\putty.reg")

Import

Double-click on the *.reg file and accept the import.

Alternative ways:

cmd.exe, require elevated command prompt:

regedit /i putty-sessions.reg
regedit /i putty.reg

PowerShell:

reg import putty-sessions.reg
reg import putty.reg

Note: do not replace SimonTatham with your username.
Note: It will create a reg file on the Desktop of the current user.
Note: It will not export related SSH keys.


https://stackoverflow.com/questions/13023920/how-to-export-putty-sessions-list

30

Thursday, November 2, 2017

Storage usage analysis tools

ncdu  tool to show map of usages from current directory down.

included in ubuntu / debian base

apt-get update
apt-get -y install ncdu


Monday, September 25, 2017

Network monitoring tools command line, Linux


Testing various command line tools, which use ncurses or other to display data on a terminal on Linux command line.

Sources of ideas:

https://askubuntu.com/questions/257263/how-to-display-network-traffic-in-the-terminal

Installs via apt-get:

bmon:  Very detailed, not a bad load.
    Tested on Asus Tinkerboard (arm, rpi clone)

wavemon:  can apt-get
   https://github.com/uoaerg/wavemon

slurm:

tcptrace:

iftop:

fping:
  https://stackoverflow.com/questions/503171/send-a-ping-to-each-ip-on-a-subnet

nethogs:

iptraf:

ifstat:

sysstat:
sar -n DEV  1

enter image description here


speedometer:
sudo apt-get install speedometer
$ speedometer -l  -r wlan0 -t wlan0 -m $(( 1024 * 1024 * 3 / 2 ))


Sunday, September 24, 2017

armbian wifi, xrdp install


  1. Ubuntu-desktop (already installed, but we did sudo apt-get install and found out)
  2. TightVNCServer
  3. XRDP (with, of course vnc4server installed with the package)

https://docs.ubuntu.com/core/en/stacks/network/network-manager/docs/configure-wifi-connections

https://people.freedesktop.org/~lkundrak/nm-docs/nmcli-examples.html

First, determine the name of the WiFi interface:

$ nmcli d
DEVICE             TYPE      STATE         CONNECTION
...
wlan0              wifi      disconnected     --
 
Make sure the WiFi radio is on (which is its default state):

$ nmcli r wifi on
 
Then, list the available WiFi networks:

$ nmcli d wifi list
*  SSID           MODE   CHAN  RATE       SIGNAL  BARS  SECURITY
   ...
   my_wifi      Infra  5     54 Mbit/s  89      ▂▄▆█  WPA2
 
As an example, to connect to the access point 'my_wifi', you would use the following command:

$ nmcli d wifi connect my_wifi password <password>
 
<password> is the password for the connection which needs to have 8-63 characters or 64 hexadecimal characters to specify a full 256-bit key.


Wednesday, August 30, 2017

Installing s-tui and pre-requisites

s-tui is a nice terminal graphic performance monitor, showing utilization, frequency and system temperature. 

Here is an article about s-tui

https://linoxide.com/monitoring-2/s-tui-terminal-tool-monitoring-cpu-temperature-linux/

and the GIThub link

https://github.com/amanusk/s-tui

It is installable with pip, so pip must be installed.

To do that, first install pip

sudo apt-get install -y python-setuptools python-dev build-essential

then pull in pip

sudo easy_install pip

next one can install s-tui

pip install s-tui

It's been tried out on raspberry pi, raspian, and on ubuntu 16.04 on intel.

It needs work on armbian, at least on the orangepi zero system.


Saturday, August 26, 2017

Program attiny 85 with arduino uno



http://curiousmotor.blogspot.in/2017/08/how-to-program-attiny-8545-using.html

Full details on link, showing lashup here from article on link above.


 After uploading the code, grab your Attiny and other stuff and set up things this way-

Raspberry pi zero headless setup

5/21/2019, another setup for headless.  Includes how to do multiple WIFI ssids

https://core-electronics.com.au/tutorials/raspberry-pi-zerow-headless-wifi-setup.html

Note:  at end of this, remember to change power save setting

https://www.gaggl.com/2017/08/set-up-a-raspberry-pi-zero-headless/

credit to leo gaggl

If you are using the GUI (Raspian full download) and want to connect your RPi Zero to a keyboard and monitor there are probably easier ways to do this. These notes are for people that want to use a headless (no monitor and GUI) setup ready to connect to your RPi after first boot via SSH from another terminal.

Download Raspbian Lite

wget -O raspbian-lite-latest.zip https://downloads.raspberrypi.org/raspbian_lite_latest
Download link: https://www.raspberrypi.org/downloads/raspbian/

Write Image to SD Card

dd bs=4M if=2017-08-16-raspbian-stretch-lite.img of=/dev/sdb
After this step there should be 2 additional mounts (if not mount the 2 SD card partitions manually).

Set up network interfaces

Create a new config file for the wireless interface.
cd etc/network/interfaces.d/
vim wlan0.conf

Add the following to the new file (if you want to use DHCP – change to static if you want to fix the IP):
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Set up connection details for local wireless network

vim etc/wpa_supplicant/wpa_supplicant.conf
Check the file and ensure the network settings are as per the Wireless Network you are connecting to.

country=AU
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="SSID"
psk=HASHED_PSK_VALUE
}

 
country=US
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
    ssid="your_real_wifi_ssid"
    scan_ssid=1
    psk="your_real_password"
    key_mgmt=WPA-PSK
}


You could use the clear-text PSK passphrase but I prefer not to do that in configuration files. Create a PSK hash using ‘wpa_passphrasethis older article
There could be other config values you might need depending on the network you are connecting to. More info: https://linux.die.net/man/5/wpa_supplicant.conf.

Ensure there are DNS Servers configured

sudo vim etc/resolv.conf
Add the following to the new file (or your own nameservers):
# Google's public DNS servers
nameserver 8.8.8.8
nameserver 8.8.4.4

Enable SSH Access

Create an ssh empty file in the mounted boot partition. This is necessary to enable SSH access as SSH is by default disabled on more recent versions of Raspbian.
cd boot/
sudo touch ssh

Boot RPi

Boot the Rpi by powering up and after ~30secs you should be able to connect to the IP assigned. Check your router or ise ‘nmap’ or similar to check the assigned IP:
sudo nmap -p22 -sV 10.1.1.0/24
Default login details are
UID: pi
PWD: rasbperry
My normal further setup steps for RPi 3 are here.
EDIT [2017-08-21]: One of the things necessary on later RPi’s is to turn off power saving mode on the WLAN interface.
sudo iw dev wlan0 set power_save off

Raspberry Pi forum entry link for headless setup

https://www.raspberrypi.org/forums/viewtopic.php?t=191252 

Another headless setup page


https://hackernoon.com/raspberry-pi-headless-install-462ccabd75d0

--30--

unix source link, TUHS.org


Page with unix sources.

http://www.tuhs.org/Archive/Distributions/Research/

Monday, August 7, 2017

systemd action 9 suspended


getting systemd action 9 suspended.

Hint here:

https://askubuntu.com/questions/108924/missing-dev-xconsole-causes-rsyslog-to-stop-as-well-as-all-other-services

https://unix.stackexchange.com/questions/168215/create-several-dev-xconsole-files-automatically-upon-boot

https://devcentral.nasqueron.org/T806
"Root cause: rsyslog was trying to use xconsole, a program not installed, to send some logs to."

seems to have vanished after installing xterm, though not clear why.

/etc/init.d/rsyslogd has code to create /dev/xconsole (which is supposedly the problem it's missing) by linking /run/xconsole to /dev/xconsole.

After installing xterm they are both still missing.

Note: this system is a server configured system with xfce4 xrdp and tightvnc installed to give remote access.  Suggestion that xterm was missing is in other online hints.

Sunday, August 6, 2017

XRDP failure log message: connecting to 127.0.0.1 5910 error - problem connecting


The messages

connecting to sesman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to sesman
login successful for display 10
started connecting
connecting to 127.0.0.1 5910
error - problem connecting


Printed in the dialog box when attempting to connect to an XRDP enabled system.

The latter problem implies a connectivity problem, which couldn't be further from the cause.

Many sites insist that installing XRDP, vncserver (of some sort) in one order or another is the problem.  Also misleading.

Then you look in xrdp-sesman-log in /var/log, you will see this

[INFO ] starting Xvnc session...
[ERROR] X server for display 10 startup timeout
[INFO ] starting xrdp-sessvc - xpid=3531 - wmpid=3530
[ERROR] X server for display 10 startup timeout
[ERROR] another Xserver is already active on display 10
[DEBUG] aborting connection...[20130627-08:55:49]
[INFO ] ++ terminated session:  username root, display :10.0, session_pid 3529, \
      ip 192.168.0.227:59050 - socket: 7

Indicating that somehow your RDP session has two Xservers active.  What happens when you log in is that a login method is performed to authenticate, and the top dialog indicates the progress of that.

Then it will spawn some VNC server session for the X session (uses 10, 11, etc.) to connect.

If you read the symptoms here, there is already a session or server on 5910.  Completely wrong.

To find the problem, one has to try running the window manager.  I don't know if this would happen for other than xfce4, which I use, but it produces the root problem.  run:

If you try running vncserver, you will see at the end of the startup this:

[dix] Could not init font path element /usr/share/fonts/default/Type1, removing from list!
[dix] Could not init font path element built-ins, removing from list!

Fatal server error:
could not open default font 'fixed'

Turns out that if any failure occurs in the chain of events between the authentication after the RDP login and getting the session going, you get the " Xserver is already active on display" message in the var log sesman log.

Other errors I suspect produce the same nonsense, someone reported when the vnc server and client couldn't agree on a geometry, the same error occurred.

This is probably the solution to all the load order issues and which vnc server (real or tight) package you use.

quoting:
I have solved it by installing xfonts-base

This also solved my problem.

set static IP from command line gui Armbian / Debian 7 Orange Pi Zero 512


Recently I acquired a couple of OrangePi Zero 512's, with a network phy, and dual usb.  The latter is not terribly useful because w/o modification to physically drive in more +5 there isn't much 5 v to spare on either port of this board.  It is powered by a USB OTG micro port, which at most will draw 2.1A.

The armbian comes up with the root password set to "1234" and a script to force changing the password at first login.  One can log in to either the serial port (presented on the OTG as a USB serial), you may wire in a serial port, or ssh into the unit once you find it.

The latter is a bit of a problem, however.  For whatever reason the current armbian is set up to assign a random crap MAC address to the board.  There is no retention of a MAC in any storage, so that isn't a huge problem.  However, the MAC must be being set early enough that there isn't any of the static storage of the root available, so no static address.

Against my desire and policy here, I decided to set a static IP to the board, which skirts the need for a static MAC.  I usually like to have everything DHCP so I can change any device by the dhcp server, but static IP will work to get round this.

to set the IP, one has to edit the ip with the network manager.  the network manager may be edited with the nmgui command.  Edit the ip from automatic to manual, and set up the IP.

The only caveat that needs to be recalled is that there is no netmask.  The gui uses the format of
192.168.0.1/24 or such to set the netmask.  Kind of against command line and file standards, but that took some hunting for when the setup failed for me a few times.  And there is no netmask prompt.

One can either reboot the system, or restart the network manager.  Seems like on a systemd type system this does that task

sudo service network-manager restart

********* on the topic of armbian  ****

this method didn't work for the orangepi to change the configuration.  Should work on some form of debian, but somewhere else must be some network code setup on armbian that ignores the settings in the /etc/networking directory configuration files.  Has no effect at all.

https://kuziel.nz/notes/2017/01/orange-pi-zero-armbian-setup.html



Thursday, July 6, 2017

Redhat EL7.3 XRDP install



http://www.itzgeek.com/how-tos/linux/centos-how-tos/install-xrdp-on-centos-7-rhel-7.html

xrdp is an Open Source Remote desktop Protocol server, which allows you to RDP to your Linux server from Windows machine; it is capable of accepting connections from  rdesktop, freerdp, and remote desktop clients. This how to will help you to setup xrdp server on CentOS 7 / RHEL 7.

Prerequisites:

1. This was written when xrdp is available neither on CentOS repositories nor on EPEL repository, after a lot of Google search; i found desktop repository (http://li.nux.ro/) which was having xrdp for CentOS 7 / RHEL 7. We need to manually setup the repository on CentOS 7.
2. Don’t forget to install Gnome on CentOS 7

Automatic (recommended):

Install EPEL and nux Desktop repository rpms.
# rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
# rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-1.el7.nux.noarch.rpm

Manual:

Create a repository file.
# vi /etc/yum.repos.d/xrdp.repo
Place the following content. Once added, save and close the file.
[xrdp]
name=xrdp
baseurl=http://li.nux.ro/download/nux/dextop/el7/x86_64/
enabled=1
gpgcheck=0

Installation:

Issue the  following command to install xrdp
# yum -y install xrdp tigervnc-server
You will get the following output, make sure you are getting package from the newly created repository.
 --> Running transaction check
---> Package xrdp.x86_64 0:0.6.1-2.el7.nux will be installed
--> Finished Dependency Resolution
 
Dependencies Resolved
 
================================================================================
Package        Arch             Version                   Repository      Size
================================================================================
Installing:
xrdp           x86_64           0.6.1-2.el7.nux           xrdp           271 k
 
Transaction Summary
================================================================================
Install  1 Package
 
Total download size: 271 k
Installed size: 1.5 M
Is this ok [y/d/N]: y
Downloading packages:
xrdp-0.6.1-2.el7.nux.x86_64.rpm                            | 271 kB   00:05
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : xrdp-0.6.1-2.el7.nux.x86_64                                  1/1
Verifying  : xrdp-0.6.1-2.el7.nux.x86_64                                  1/1
 
Installed:
xrdp.x86_64 0:0.6.1-2.el7.nux
Once it is installed, lets start the xrdp service.
# systemctl start xrdp.service
xrdp will listen on 3389, lets confirm this by issuing following command.
# netstat -antup | grep xrdp
tcp        0      0 0.0.0.0:3389            0.0.0.0:*               LISTEN      1508/xrdp
tcp        0      0 127.0.0.1:3350          0.0.0.0:*               LISTEN      1507/xrdp-sesman
By default, services wont auto start after system reboot. Issue the following command to enable the service at system start up.
# systemctl enable xrdp.service
Next is to create iptables rule to allow rdp connection from the external machines, following command will add the exception for rdp port (3389).
# firewall-cmd --permanent --zone=public --add-port=3389/tcp
# firewall-cmd --reload
Configure SELinux
# chcon --type=bin_t /usr/sbin/xrdp
# chcon --type=bin_t /usr/sbin/xrdp-sesman

Test:

Now take rdp from any windows machine using Remote Desktop Connection, enter ip address of Linux server in computer field and click on  connect.
CentOS 7 – xrdp MSTSC
You would be asked to enter the user name and password, you can either use root or any user that you have it on system. Make sure you use module “sesman-Xvnc”.
CentOS 7 – xrdp Login page
If you click ok, you will see the processing. In less than a half min, you will get a desktop.
CentOS 7 – xrdp Desktop

Sunday, June 11, 2017

Restoring Ultra 5 NV ram info


This set of notes resets a serial into a Sun ultra 5 after power on, or replacement


Note that the BIOS battery in this unit has expired (the system was manufactured 17 years ago after all).  When you initially power on the system, you will need to program the PROM serial number and manually boot the system.  The procedure to program the PROM serial number follows:

1.) Invalidate the PROM XOR checksum:
57 f mkp <enter>
2.) Program the PROM's Serial number:
8 0 20 2b 59 d2 2b59d2 mkpl <enter> <ctrl-d> <ctrl-r>
3.) Reset the system so that the system detects a proper serial number during POST:
reset <enter>
4.) Boot internal hard drive:
boot disk <enter>

*If you need to stop the system, press <stop-a> to get to the "OK>" prompt.
 
 

Friday, June 9, 2017

Downgrading php from 7.0 to 5.0


Php7 is installed by default on Ubuntu 16.04. 

The copy of gregarius, an RSS aggregator / reader uses php revision greater than 4.  Many of the mysql php core functions, and string editing is needlessly mangled in 7.0, and editing and updating the gregarius package is a very large task.

It is easier to downgrade the php for now than editing gregarius.  FWIW gregarius is pretty much dead in support after 2006, very old, which is sad since it is a nice stable tool.

it requires mysql, but luckily the downgraded php 5 works along with the mysql extensions.

Procedure snarfed from another blog to remove php 7 and install 5.6 from another repository, ondrej.

Remove all the stock php packages
List installed php packages with dpkg -l | grep php| awk '{print $2}' |tr "\n" " " then remove unneeded packages with sudo aptitude purge your_packages_here or if you want to directly remove them all use :
sudo apt-get purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "`
Add the PPA
sudo add-apt-repository ppa:ondrej/php
If you get add-apt-repository: command not found run the following command first :
sudo apt-get install software-properties-common
Install your PHP Version
sudo apt-get update
sudo apt-get install php5.6
You can install php5.6 modules too for example
sudo apt-get install php5.6-mbstring php5.6-mcrypt php5.6-mysql php5.6-xml
Verify your version
If you have installed php5.6-cli
sudo php -v
If you don't have php5.6-cli, put this on a .php file
<?php 
      //outputs php configuration info
      phpinfo(); 
?>

restarting apache

dpkg-reconfigure phpmyadmin

x

Tuesday, May 30, 2017

foscam dvr and camera web plugins blocked by flash


In Firefox 52 (? I think) the flash execution is blocked by default.  There is no key present to disable the blocker in the Firefox config.  Instructions from Foscam support shows what to do go go round it.

If you are vulnerable to exploits this may allow malware to run flash exploits, so any PC this is installed on should be evaluated for public or even local exposure to malware.  Suggest no email, no browsing, limited lan exposure, or even private router natted if you are really paranoid.

****************
Firefox has just released new version 52.0, in this version it has disabled support for NPAPI plugin which Foscam and other manufactures are using.

With this update, Foscam plugin can no longer run properly.
 But you can still setup Firefox following below steps to get your Foscam devices work again on Firefox 52.

Step1: Input about:config in Firefox address bar, hit enter

You’ll see warning message below, please click ‘I accept the risk’.

Step2: Right click and choose New, then Boolean
Please input name plugin.load_flash_only
Then click OK, choose false and click OK again.
Step3: Please restart Firefox and try again.

Saturday, May 27, 2017

Openmediavault notes


Openmediavault is an opensource nas system that supports intel and arm.

Most notes here will be related to the Friendlyarm Nanopi Neo and Nanopi Neo2

First tests with v1.0 media dock had some problems.  The USB port on the dock board worked, but the original attempt to use a Seagate 2tb drive didn't work.

After much help from Friendlyarm and debugging the kernel, it appeared that there was a probably known bug manifested for the drive in this case.  Will be testing later with other drives and also new builds of the kernel as well to see if that problem works out.

Great support from Friendlyarm in working on this.

V1.0 JM20329 SATA -> USB bridge.  The board has a 12V supply which runs both the SATA drive and the NEO or NEO2 board.

Updates for V1.2 to follow.

The Friendlyarm NEO and NEO2 both have debian builds with openmediavault already built.  Most of the instructions for installing the OMV on the Intel or generic build up install can be ignored, because as supplied, the Friendlyarm images have been installed with generic settings, then the SD images saved.

The instructions below have instructions on a "from bare metal" install on Intel and perhaps others, and the info for configuring the Openmediavault post install from the web interface is the reason for including the links or information here.


Links:

Howto forge page on installing scratch openmediavault.

https://www.howtoforge.com/tutorial/install-open-media-vault-nas/

Current OMV version for NEO2 in use:

5/25/2017, link below

http://www.mediafire.com/file/89ugz0iig8jt6lv/nanopi-neo2_debian-nas-jessie_4.11.2_20170525.img.zip

Thursday, May 25, 2017

c# json. Converting json to c#; convert xml to c#




For those who land here from google searching for the reverse
(generate the C# class from JSON) - I use those fine online tools:
From reverse jsonclassgenerator tool is great. Another simple option is to use Edit->Paste Special-> Paste JSON as Classes in Visual Studio. This creates a class too! Quite handy sometimes. – sandiejat Mar 16 at 5:25
Json <--> csharp
part1:
part2

Tuesday, May 16, 2017

Ebay history download tool

Ebay doesn't let you download your buy history.  This tool exports it in various formats.

The most useful being xml.  However the XML is actually exported as a multivalue format,
and generic parsers do not get it right.

schema is:

<order>
  <items>
     <item></item>
     <item></item>
  </items>
  <items>
    ...
</order>

within each <items> object there are multiple <item> objects each representing a separate transaction with the vendor of <items> object.  So a multi-valued database would have no problem.  However
linear xml parsing results in a mess if translating later to such as an XML or flat file.

however beats nothing as an export tool

There is a chrome plugin called "ebay purchase history report". This is the best I have found so far. Only problem is it does not show the tracking# of the ordered item.

https://chrome.google.com/webstore/detail/ebay-purchase-history-rep/ohoebnmmkndcieckfjblpdlfjpaeonbc


Friday, May 5, 2017

Replies to Zos messages


http://narkive.com/OTIqXkPg:3.637.2

Issue is how to reply to messages.  

IXC208I THE RESPONSE TO MESSAGE IXC420D IS INCORRECT: IS NOT A VALID ACTION
IXC420D REPLY I TO INITIALIZE SYSPLEX ADCDPL, OR R TO REINITIALIZE XCF.
REPLYING I WILL IMPACT OTHER ACTIVE SYSTEMS.
I
IEE282A REPLY 00 EXPECTED; NO OTHER COMMANDS ACCEPTED. SPECIFY
REPLY 00.
All replies to messages in z/OS (and other versions of MVS) are done with
the reply command. The command is issued as "R <id>,<text>", where <id> is
the reply ID printed next to the message and <text> is the text of the
reply. There's no reply ID shown next to this message because the reply ID
at NIP time (before the full console display is redrawn) is always 00. That
means you need to enter the command as "R 00,'I'" (without the "").

Thursday, April 27, 2017

Ubuntu 16.04 exfat mount with ntfs. 128gb SD cards example




How to Mount EXFAT partition on Ubuntu 16.04 LTS

To mount exfat partition on Ubuntu, simply install the necessary packages:
$ sudo apt-get install exfat-fuse exfat-utils

If you need to mount it from the command line, you could do
$ sudo mkdir /media/exfat
$ sudo mount -t exfat /dev/sdxx /media/exfat
where /dev/sdxx could be /dev/sda1 or /dev/sda2, or so on.

If you are not sure whether the exfat partition you are looking for is /dev/sda1 or /dev/sda2, then you could also run
$ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
This should do it!

http://unixnme.blogspot.com/2016/04/how-to-mount-exfat-partition-in-ubuntu.html 

The ghome-disks utility can also be used to start and mount this.  Since it is /dev/mmc and not /dev/sd, the system will probably have it assumed to be system owned, and will mount under root ownership only.

You can follow the above, but will then have to do a lot of crap with permissions to the mount.  If it were or is a fixed mount and not the automount /media mechanism one can do that once.  However it will be reset on every mount and be inconvenient.

Solution might be to use gnome-disks.  That has a problem however.  The FUSE exfat driver and the above asset is root owned.  Gnome-disks will not access and mount it due to the system ownership problem

So use a utility to run gnome kit stuff from a command line as su root.

apt-get -y install gksu

installs the gksudo and other stuff.

gksudo gnome-disks will mount the device and make it properly available.

Note that sudo gnome-disks makes the thing root owned again, since you are running as root user in the desktop.  gksudo will run as root, but effectivly as the user desktop user id.

Thursday, April 20, 2017

support for ancient ubuntu releases


I've got a couple of machines that probably won't upgrade nicely, and the "gee why can't you upgrade them" comments are useless.  The ones I had were appliance downloads popular at the time I obtained them, and there was not the usual trail of how they were built accompanying them.

since one is my email archive I will continue to run it till SMTP POP3 and IMAP protocols die without any update.

Here is a link which worked for my oldest version, hardy, which is Ubuntu 8.  The date of the release is to probably 2006 maybe earlier.

https://superuser.com/questions/339537/where-can-i-get-the-repositories-for-old-ubuntu-versions

Here is the most useful answer (including the useless suggestion to update). 

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

Your system is End-of-Line (EOL), therefore not officially supported. Unless you have a good reason for sticking with 9.04, upgrade to a newer version. 16.04 is the next long-term supported release for Ubuntu, which will continue to receive updates.
To access old Ubuntu repositories, take a look at http://old-releases.ubuntu.com/.
There is also an official Ubuntu documentation for EOL upgrades
They say you should be able to access your packages by putting the following into /etc/apt/sources.list. Important: Change CODENAME to your distribution's code name, e.g. jaunty.


## EOL upgrade sources.list
# Required
deb http://old-releases.ubuntu.com/ubuntu/ CODENAME main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ CODENAME-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ CODENAME-security main restricted universe multiverse

# Optional
#deb http://old-releases.ubuntu.com/ubuntu/ CODENAME-backports main restricted universe multiverse
 
 
Just run apt-get update and you can use them.

Thursday, April 6, 2017

Migrating Readynas Radiator to OS 6 Readynas devices


One challenge in migrating from Sparc architecture products, to Intel or other (Arm), is that the Linux file system on sparc was built with a 4k block size, rather than 512.

On Intel linux, if you set up your disks, you can mount them with some incantations and special procedures.  Not sure how the Readynas Linux handles that problem, but there is a link showing it.

I had a bad disk and some problems with the data recovery firmware on a REadynas NV+ some years ago and got the support group to help me get around it.  In the mean time, I had mounted the 4 drives on an Intel linux system I'd built up and had recovered most of the data.

https://kb.netgear.com/29875/ReadyNAS-Migrating-disks-from-RAIDiator-to-OS-6?cid=wmt_netgear_organic

Copy of article for archival:

This articles outlines the necessary steps to access data on disks from ReadyNAS units running RAIDiator on ReadyNAS OS 6 units.
Due to differences in CPU architecture and operating system between RAIDiator and ReadyNAS OS 6, it may be necessary to take additional steps once the disks are moved to an OS 6 chassis.
If your ReadyNAS running RAIDiator is still functional, and you can access the data, we recommended you first backup the data to another location
http://kb.netgear.com/app/answers/detail/a_id/21344
If you can no longer access the data using your legacy ReadyNAS and you wish to access the data using your ReadyNAS OS 6 device, booting may not be as easy. Depending on which legacy model the disks come from, and which ReadyNAS OS 6 you posses the steps differ to make the data accessible.
After initially moving the disks from the legacy ReadyNAS to the ReadyNAS OS 6 model please be aware of the following items;
  • Do not attempt an OS reinstall
  • Do not attemp a factory reset
  • The RAID must be healthy i.e. if the RAID was broken on the legacy NAS it will not always be possible to access the data on the ReadyNAS OS 6 - an example of this would be 2 failed disks in a 4 disk RAID 5.
  • ReadyNAS OS 6 model must have at least the same amount of drive bays as the legacy ReadyNAS
  • Logging a ticket with Technical Support may be required
  • Purchasing a data recovery contract may be required
  • You may require one additional spare blank disk
  • You may require an external location to where you can recover your data to i.e. external USB HD, network share, other NAS storage.
To find the steps needed to access the data on your ReadyNAS OS 6 device, find your model below:
  • ReadyNAS OS 6
    • ARM
      • ReadyNAS 100 series (RN102, RN104)
      • ReadyNAS 200 series (RN202, RN204)
      • ReadyNAS 210 series (RN212, RN214)
      • ReadyNAS 2120 (RN2120)
    • x86
      • ReadyNAS 300 series (RN312, RN314, RN316)
      • ReadyNAS 500 series (RN516)
      • ReadyNAS 700 series (RN716X)
      • ReadyNAS 3130 (RN3130)
      • ReadyNAS 3138 (RN3138)
      • ReadyNAS 3220 (RN3220)
      • ReadyNAS 4220 (RN4220)
Find the model of your Legacy ReadyNAS running RAIDiator, click on the link and follow the instructions. X represents whether or not your model came with disks.



Tuesday, April 4, 2017

NFS Client and Server setup pages


To set up NFS Client and Server functions on Debian, et. al. here are some notes

NFS Server

apt-get install nfs-kernel-server nfs-common

NFS Client

apt-get install nfs-common

Exports

/home/jws           192.168.0.101(rw,sync,no_subtree_check)
/var/www        192.168.0.101(rw,sync,fsid=0,crossmnt,no_subtree_check,no_root_squash)

Other setup details related to mount @ boot time, etc., refer to link below.

Examples above from:

https://www.howtoforge.com/install_nfs_server_and_client_on_debian_wheezy

Tuesday, March 28, 2017

Readynas Radiator 4.1 firmware problem with SMB CIFS shares


The changes made to SMB protocol from version 1 to version 3, seems to have killed the share mode of access on readynas older systems.

Switching to user share mode and creating a user is a pain as well.

But the share name is entered as a user id in passwd, but not put up as a user in the gui, which is a huge hole when you switch from share to user.

the only method of fixing it is to install EnableSSHAccess and log in as root.  One can then set an SMB passwd on the shares that exist, and each will be accessible with that passwd on system thru so far and including windows 10.

Also other secured user access is then possible once the sharing is turned on if desired.  The users cannot access others storage w/o using group access features.

Of course this has a possibility of voiding any service you have with Netgear (warranty for 4.x devices is long gone).  But if you have any service agreements, don't do this w/o checking since it may impact your agreements for unauthorized user mods to devices.

To install ssh access for 4.x radiator do the following

Download EnableRootSSHAccess for your architecture from here

EnableRootSSHAccess

Original NV+ and 1100 systems are Sparc.  Pro and Ultra systems on 4.x will be Intel.  I'm not sure if Arm has a 4.x version.  All the ones I've seen with Arm are 6.0

then:

  1. Get the SSH bin file from the ReadyNAS web site. Click the Add-ons for RAIDiator 4.1.3+ link and scroll to the EnableRootSSH link. Download the bin file and store it on your local computer.

  2. Log in as admin on your ReadyNAS using a browser

  3. Update your ReadyNAS firmware (optional). This is under System > Update. Just click the Check for Updates button.

  4. Click the Local tab and click Choose File to find the EnableRootSSH.bin file that you previously downloaded. Upload this and follow the prompts.
 A restart of the Readynas system is required, if you have other users on the device.  (since some windows systems may work).  I doubt if any samba stacks such as one would have with shares on MacOS would work, but they may be impacted.

Install instructions from here;

http://blog.epdoc.com/2009/11/ssh-on-readynas-nv.html







CIFS mount problem on Linux, Error 12, can't allocate memory error


There is a workaround for this which is in the link below.

What worked however is this:

reg add HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters /v Size /t REG_DWORD /d 3 /f
sc stop  LanmanServer
sc start LanmanServer

Will have to research and update link with whatever is being done, but this worked for mounting my Google driver server windows 7 system.

Windows Xp so far has not shown the problem.  Other options have been necessary too, this is just the latest.

Occured on a Cubox debian Wheezy system on 3/27/2017 for me.

mount-cifs-mount-error12-cannot-allocate-memory

Monday, March 27, 2017

Microdata, Decision Data, and Western Dynex boards


These boards showed up in an auction and Al Kossow kindly directed my attention to the boards, sold after the system was scrapped.

There is a clean set of spares from a 2400 RPM Dynex, probably a 6000 drive, including backplane and terminator.

There is a Decision Data + Intel manufactured processor and memory set, as well as an 8 slot backplane in the lot.

And there is a Microdata manufactured 1600 board set in the lot, but with Decision Data markings in the etch and some of the silkscreens.  This includes a larger 14 slot backplane.

Included in the Microdata set, is a CPU set, DMA board set, 2950 (Decision Data badged), and one (or two) A20002613 8ways.  The 2613 had full modem control.

There is also an 8 port DB 25 board, which should work with any of the 8ways available, hopefully via ribbon cables.

There is an interesting cabling setup with an additional 50 pin connector on the 8 port connector that will have to be investigated.

Both of the backplanes are powered via molex connectors, rather than the Microdata Paddle board approach in the last slot.

Boards from Western Dynex 2400 RPM drive, probably 10mb capacity.

A2 Control

Tag says 2400RPM.  I am going to infer this was for a 10mb (5 over 5) drive, since I doubt many 5mb drives were made at 2400RPM

Closeup of service tag.  shows 2400RPM

Sector Counter A1

Servo A3

Data A4

Backplane, Pin side, showing Terminator and input cable slot

A1 Sector Counter / Control
A2 Control
A3 Servo
A4 Data
Backplane Component side.  Both sides have 3 level WW pins available on all pins

Set of boards in backplane, best guess as to location

Closeup of the shot with the boards in backplane
Only one board identified as Servo is pretty certain.  I guessed from memory on the others.
Closer shot of the boards in backplane

Decision Data processor set

8 Way connector Top 2 cables are probably from 2613.  not sure what the other one did





8 slot backplane.
Since there are no keyways in the backplane, and none on the 2901 cpu set boards, I'm guessing this is the backplane for the newer system.

Also it only hs the single 12 pin Molex power connection.  There is an 8 slot rear of board connector on the memory board below, probably to supply +5 and maybe a minus voltage to the memory array, so the backplane supply is probably enough +and- 12 to run the 2613's and a lot of +5 and ground

2901 cpu and firmware
Sadly one rom is missing, so no firmware disassembly is probably going to happen.
2910 and other logic in second CPU set board
A 40 pin chip / socket has been totally scraped off this, as well as maybe some other damage.  Worst damage of the lot.
Intel Memory board
The Etch shows Intel (in Intel font) made this board.  All the chips are NEC though.  Guess all the work making the board didn't pay off for the Intel memory division, unless they distributed or resold NEC parts.
Memory array on the Intel board
The array is of 16K x 1 parts, and there are 11 parts in each column.  Suggesting single bit correction 2 bit detection ECC capability with the memory.

Total of 64K, which would align with what a Microdata 1621 firmware board would do.
Memory chips with legible part#s
NEC UPD416C-2 parts  Date code 85 maybe on one chip?
NEC UPD416C-2  Link copied 3/2017
NEC UPD416C-2  PDF data sheet link copied 3/2017

200ns 16k x 1 memory Page Mode Dram

Microdata Compatable / manufactured (In*sight) boards

A20002613 8 way with modem control

Microdata A20002515 DMA board

Microdata A20001242 Control CPU board

Microdata A20001043 Data CPU Board

Second A20002613 8 way with modem control

A20001044-1 Front panel interface

14 slot backplane for Microdata CPU. 
From the spacing and practicality of the design, the 1040 front panel board goes in the slot on the left in the backplane.  Microdata had a 12 slot  with 20 amps, and an 18 slot with 40 amps (or 20) of their own.

Some outfit named Elko Pacific made these backplanes.  The connectors do not match the most common Microdata part for their original backplanes.  CDC originated the backplane connector that Microdata used.

This connector may be from a 130 pin connector vendor who made parts for the later Reality 6000's 8000s, and Royale systems.  The 1040 backplane had a heavier bakelite / plastic component.
Closeup of Elko Pacific badge and power input
Serial numbering didn't match the style of Decision data which used such as 111DDxxxx numbering

Also the backplane termination is shown.
This is serialed 6-05607

Closeup showing more etch info
Type A 18801434-2
also various other inspection stickers
111MD01001 is the Decision data style part number and appears to be possibly silkscreened on

Serial I/O DB-25 panel
Will to figure out if there is anything more than a multipurposing of the design to have the extra 50 pin connector.  The Microdata A20002613's would have used two 50 ribbon cables to the board.

Possibly another design board made by Decision Data used just a single 50 and omitted some signals.

When Microdata originally licensed the CPU to people, they had a single port RS232 with modem control board, a 4 way which had no scanner.

There were two 8 port boards with scanners, the 2612 and 2613.  The 2613 was designed by Bill Homans as one of his first projects.  Both of those boards had a scanner feature which was clocked around to present the status lines of each 8way to the software.  There was logic to "lock" the scanner when a line had a status change.  Ports could be disabled, in input listen and lock mode, or in interrupt driven output lock mode.

A single address starting @ 0x18 in the 1600 address space would control the board.  The board had one interrupt for the board, and usually used firmware assist to run the boards.

The original 1600 could run well with the later A20002614 and A20002615 designs, but did not do that well with the 2612 or 2613.

Microdata Reality used the 2614, 2615, and Irvine Computer Corp 80010001 8ways for I/O.

The 2614 and 2615 had only to have ground, transmit and receive to work.

The ICC 8way added flow control in and out in hardware with some additions of hardware to monitor the Reality I/O state.