Announcement

Collapse
No announcement yet.

What's the "Linux Tools" password?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ARA
    replied
    Rereading your earlier post, I noticed
    I removed the old pi account and created a new one.
    It occurs to me that the two pi user accounts will have different UIDs (User/Unique ID). (I also gather from this that you did an upgrade, or at least read in users from the previous account - rather than install on a freshly formatted SD card.) It may be that some of the files in your HS3 backup are still owned by the pi user with the old UID. Or possibly HS3 is trying to reference the pi user by the old UID. I wouldn't exactly expect this to trigger a segfault - especially if you're running HS3 as root - but I suppose it's possible. You can use "ls -l" in the HS3 directory to see details about all the files. Normally, it resolves the UID/GID to the user/group names for readability.

    -Alex

    Leave a comment:


  • Kerat
    replied
    Originally posted by ARA View Post
    I always associated segmentation faults with memory addressing errors. It could be that check_passwd is trying to read/write some file it doesn't have access to - but that seems unlikely if you're running HS3 as root.

    Just to clarify, you are running the ARM version of check_passwd from a Raspberry Pi version of HS3?

    -Alex


    Affirmative, running the arm compiled version of check_passwd. I was pretty sure it is a permission issue. I will reload my last image backup from the old build and confirm it was working there again.


    Sent from my iPhone using Tapatalk

    Leave a comment:


  • ARA
    replied
    Result: Current password incorrect.
    /opt/homeseer/./change_password.sh: line 3: 9832 Segmentation fault ./check_passwd $1 $2
    I always associated segmentation faults with memory addressing errors. It could be that check_passwd is trying to read/write some file it doesn't have access to - but that seems unlikely if you're running HS3 as root.

    Just to clarify, you are running the ARM version of check_passwd from a Raspberry Pi version of HS3?

    -Alex

    Leave a comment:


  • Kerat
    replied
    just migrated to a new Raspbian Lite image

    So, I decided to rebuild my OS image using Raspbian Jessie Lite this time. I loaded webmin this time and it is pretty cool. i still need to play with winscp.

    On my new build I used a BLbackup image of my HS3 for linux install. I moved the install directory from "pi/Documents/homeseer/HomeSeer" to /opt/homeseer and moved all my custom bash scripts into /opt/homeseerctm/ctmscripts. I removed the old pi account and created a new one.

    The new Jessie seems to have gotten rid of the init.d and replaced it with systemctl. I was able to get that component working without too much trouble. I am allowing it to run with root as I have not gotten around to creating a service account just for this application.

    I checked my Linux tools and found that my password isn't working again... linux tools shows "password incorrect". when I attempt to update the password tools-setup-change system password and enter the default password and attempt to set a new one i receive the error

    "Result: Current password incorrect.
    /opt/homeseer/./change_password.sh: line 3: 9832 Segmentation fault ./check_passwd $1 $2"

    segmentation fault would appear to be a permission issue to me. any idea what i did wrong?
    Last edited by Kerat; October 15, 2016, 12:53 AM.

    Leave a comment:


  • Kerat
    replied
    Originally posted by Pete View Post
    The SSH web page is just a directory as you have seen.



    Tested it this morning using Firefox / IcedTea and it just locks up the browser.



    It was convenient and easy to use allowing SSH access to any device.



    That said it no longer works with current versions of Java.



    There is a text command line Ajax enabled plugin that works in Webmin just fine.


    Ok, I will have to figure out what I am missing , I tried to install webadmin on my RPI 3 and it didn't install anything.


    Sent from my iPhone using Tapatalk

    Leave a comment:


  • Pete
    replied
    The SSH web page is just a directory as you have seen.

    Tested it this morning using Firefox / IcedTea and it just locks up the browser.

    It was convenient and easy to use allowing SSH access to any device.

    That said it no longer works with current versions of Java.

    There is a text command line Ajax enabled plugin that works in Webmin just fine.
    Attached Files

    Leave a comment:


  • ARA
    replied
    So it seem you have two questions. First there is the formatting of the HS3 Linux Tools page. Pretty formatting can be had by installing the 'aha' package - the Ansi HTML Adapter - as Pete mentioned. I would expect it to be in the package repositories for Raspbian. I know it's built for ARM by Debian and OpenSuSE if not.

    Second, you mention the web based SSH terminal. I haven't used this - even on a regular x86. I believe the custom link Pete is referring to can be found in the HS3 control panel. Try putting in the path to the unzipped SSH webpage in one of the custom pages under Tools->Setup->Custom. I'd be interested to hear how this works out. I currently have direct ssh access to my box, but can see where I might not in the future and this sort of thing could be very useful.

    Finally, I'm very pleased to hear you got the "check_passwd" program working. Nice work. I don't know of any more architecture specific programs. I guess we'll find them as we go along.

    -Alex

    Leave a comment:


  • Kerat
    replied
    Originally posted by Pete View Post
    Yes; thank you. Here really never use it as the only way I could ever get it to work makes it difficult to read in Firefox,

    did notice that aha is a Ansi HTML Adapter. Never played with it though and wondering if it was installed in the original Zee.

    running command df -H Filesystem Size Used Avail Use% Mounted on udev 897M 0 897M 0% /dev tmpfs 184M 5.7M 178M 4% /run /dev/sda1 28G 9.5G 17G 37% / tmpfs 916M 156k 916M 1% /dev/shm tmpfs 5.3M 4.1k 5.3M 1% /run/lock tmpfs 916M 0 916M 0% /sys/fs/cgroup cgmfs 103k 0 103k 0% /run/cgmanager/fs tmpfs 184M 0 184M 0% /run/user/0 tmpfs 184M 29k 184M 1% /run/user/1000

    It's been a while and I tried to reformat the output and gave up. Never really used it much though.

    So installed aha on my 16.04 64 bit motherships and the linux commands now are formatted to look nice.

    IE: sudo apt-get install aha

    The posted above SSH terminal works only with iced tea these days.

    Noticed too that Webmin has a nice little terminal option. See attached picture.
    Has anyone been able to convince this to work on HS3 Linux hosted on an RPI?

    Leave a comment:


  • Kerat
    replied
    Shell window within linux tools

    Originally posted by Pete View Post
    Here the Linux tools works fine in my Zee setup but not in the HSPro setup.

    Unzip the attached to your html directory and run it via a custom link.

    Works well here. You can play with the html file making it more HS3 centric.
    Hello, Please forgive my Noobiness. I would like to run the linux tools and have it render more readable. I have dowloaded the zip file, decompressed it and put it in my HTML folder on my HS3 Linux hosted on an RPI 3B running Jessie. Where and how do a create the custom link?

    Leave a comment:


  • Kerat
    replied
    replace the X86 compiled "check_passwd"

    Huzzah!!! I spun up a HS3 for RPI image, found "check_passwd" file in the program directory, installed SMB services on the system, and the Replaced the X86 compiled "check_passwd" file with the Arm compiled "check_passwd" the change system password now seems to work perfectly.

    Additionally, now the Linux tools feature allows me to enter a password and gain access to the feature.

    Are there any other X86 compiled files I should pull over to my production environment before wiping this testing system?

    Leave a comment:


  • Kerat
    replied
    linux tools password bypass works

    Originally posted by ARA View Post
    So if I've got this straight (and please correct me if I'm wrong),

    The Linux version of HS3 expects to run as the Linux user 'homeseer'. It expects you to change this password on first start-up. If the user 'homeseer' doesn't exits on the Linux system, it pops up an error such as other here have reported.

    Question? Is the 'homeseer' user is a superuser (root equivalent) or just a regular user?

    In this same screen, it also wants you to create a HS3 user/password, which will become the default administrator for HS3. Additional HS3 users can be created in the 'Network' tab of 'Tools->Setup'. These users can be privileged or not and are separate and distinct from Linux users.

    Now, I'm running HS3 (3.0.0.293) on OpenSuSE Leap 42.1, using my own Linux and HS3 user setup - no 'homeseer' user to be found. As such, I encountered the same error that others reported when trying to change the 'system' user password. HS Tech Support told me I could safely ignore the error, and bypass that section of the page.

    When I got to the 'Tools->System->Linux Tools' page, I am presented with a username/password box. It asks for the system user (default is 'homeseer') and the system password to access Linux tools. As I've no Linux user 'homeseer' that won't work; however I can login with a regular (non-superuser) Linux user. At that point it presents a dialog to enter a command and execute it. Here I encounter the same results as Pete - it prints 'running command ...' and nothing else happens.

    Poking around in the HS3 directory I came across two shell scripts - run_command.sh and run_command_raw.sh. It seems that HS3 is taking the command we enter and passing it to the run_command.sh script which prints out the 'running command...' and then executes the command. However, run_command.sh pipes the output of any commands it executes to something 'aha' - I don't know what that is in reference to, but removing it makes the whole thing work.

    I replaced the existing run_command.sh script:
    Code:
    #!/bin/sh
    echo running command $1
    $! | aha
    with
    Code:
    #!/bin/sh
    echo running command $1
    $1
    And now I can login to the Linux tools page as a regular Linux user and execute commands. Not quite as nice as a SSH terminal, but handy for some things maybe.

    I don't know what the run_command_raw.sh script is used for.

    This seems like a good place to make a few notes about TTS (Text To Speech) in non Debian distros too. By default Linux HS3 makes use of the speak.sh script to speak alerts, etc.

    Looking at speak.sh:
    Code:
    #!/bin/sh
    #flite -voice kall16 -t "$1"
    pico2wave -w=temp.wav "$1"
    aplay temp.wave
    We see that it uses pico2wave to generate a wave file of the text to be spoken. It then uses aplay for actual playing of the file. If pico2wave is not available for your distro (it was very difficult to find as a RPM) you can simply uncomment the second line and comment out the last two lines to change from pico2wave to flite as the speech engine.

    Code:
    #!/bin/sh
    flite -voice kall16 -t "$1"
    #pico2wave -w=temp.wav "$1"
    #aplay temp.wave
    This has some interesting possibilities - you should be able to use other TTS engines, like Festival, if you were so inclined. Also, it seems to indicate that flite is not actually required for HS3 to run.

    Thanks for helping me figure this out,
    -Alex

    That actually works very well, though now that I am online with myHS i set this to require a password again.

    Leave a comment:


  • Kerat
    replied
    Alex,
    Thank you for the reply, I ran "file checkpasswd" and found that the file is compiled for 32bit processing. honestly I was worried about running my HS3 implementation this way, but i did so to have access to the full version of HS3.
    It should be easy enough to spin up an RPI HS3 server and see if the file is compiled in ARM instead. I will do that and report back.
    Does anyone know if there are other X86/X64 compiled applications hosted in HS3 Linux?

    Leave a comment:


  • ARA
    replied
    Thank you for being so descriptive with your problem. It provides some insights as to what may be the cause.

    Line three reads "./check_passwd $1 $2". is it saying that it isn't able to run the file check_passwd and pass it the variables?
    Correct, from the error message:
    Result: Current password incorrect.
    /home/pi/Documents/homeseer/HomeSeer/./change_password.sh: line 3: ./check_passwd: cannot execute binary file: Exec format error
    We see that it tries (and fails) to execute the check_passwd file. In particular it tells us that it has an "Exec format error". The likely cause is that you are trying to execute an x86 program on an ARM processor. That is, the check_passwd file is a compiled binary program for a regular Intel computer and it won't run on a Raspberry Pi. You can check for this by going to the HS3 directory containing the check_passwd file and running:

    Code:
    $ file check_passwd
    On my system (regular computer) I get:

    Code:
    check_passwd: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24
    Which tells us it is an Executable and Linkable Format (ELF - or program file) compiled for 32 bit Intel 80386 (x86) architectures. If you get the same on your RPi, then this is your problem.

    This means you won't be able to change the Linux system password via HS3. Only through the shell.

    Now, presumably the RPi images of HS3 - for the Zee, etc. - have the check_passwd file compiled for the ARM architecture. But I don't have one hanging around to check. If you had a copy of it, you could replace the x86 version and HS3 should work. It would be an interesting experiment.

    As a side note, this is interesting as I hadn't realized HS3 included any components compiled for specific architectures. Pretty much everything else seems to be written in Mono and cross-platform.

    I have read some of the posts on this thread and have found that some users are saying I need to run my HS3 install under a separate user named "homeseer". is this the case? are there any other Users I need to add? do I need to make the account that loads HS3 run as admin?
    It is my belief (but I have no confirmation) that HS3 on Linux expects to find a user "homeseer" when it first starts up. However, you can run HS3 as any user you want. Indeed, this "homeseer" user doesn't even have to exist on your system. I experimented running HS3 as a regular user, but I am currently running it as a superuser (admin or root) because I need services that are only available to those accounts.

    With regards to accessing the Linux tools, you should be able to log in to that page using a regular Linux user. However, by default, HS3 expects to have 'aha' installed. If the aha program is not there, you won't see any output when you execute a command.

    -Alex

    Leave a comment:


  • Kerat
    replied
    problems updating System Password and Linux Tools

    Hello all,
    I am still pretty new to Homeseer. I am not the best with Linux, but I get by. I am currently running HS3 on an RPI 3.

    Hardware and OS Configuration:
    Linux <HOSTNAME> 4.4.7-v7+ #876 SMP Tue Apr 12 22:28:41 BST 2016 armv7l GNU/Linux

    PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
    NAME="Raspbian GNU/Linux"
    VERSION_ID="8"
    VERSION="8 (jessie)"
    ID=raspbian
    ID_LIKE=debian

    Mono:
    Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-10)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS: __thread
    SIGSEGV: normal
    Notifications: epoll
    Architecture: armel,vfp+hard
    Disabled: none
    Misc: softdebug
    LLVM: supported, not enabled.
    GC: sgen
    HS3 info is as below:
    Current Date/Time: 10/2/2016 8:54:54 PM
    HomeSeer Version: HS3 Standard Edition 3.0.0.258
    Linux version: Linux <HOSTNAME> 4.4.7-v7+ #876 SMP Tue Apr 12 22:28:41 BST 2016 armv7l GNU/Linux System Uptime: 0 Days 1 Hour 49 Minutes 59 Seconds
    IP Address: <LOCAL SUBNET IP>
    Number of Devices: 20
    Number of Events: 10

    Enabled Plug-Ins
    0.0.0.25: Pushover 3P
    3.0.1.87: Z-Wave

    I was able to address issues with the Mono to ensure that HS3 would run on the box. I am running Mono and the HS3 application under the Pi account. I have password protected the account using the RPI config tool.

    I am considering attempting to make my management UI accessible either openly if I can ensure that the traffic is encrypted or across my home VPN tunnel if not, but want to ensure that I am not putting the host OS in unreasonable risk. My plan was to make sure that the system password was set to something only I would know. I have found that I am not able to reset the system password or access the Linux tools. I don't recall being prompted to do this when I initially setup the system and I have tried all the passwords I would configure.

    When I navigate to tools - system - change system password I enter the password that the instructions denote and attempt to give it a new password but end up receiving the following error:

    Result: Current password incorrect.
    /home/pi/Documents/homeseer/HomeSeer/./change_password.sh: line 3: ./check_passwd: cannot execute binary file: Exec format error


    i have access to shell into the system remotely from my main PC. I took a look at the change_password.sh file:

    #!/bin/bash
    # $1=user $2=current pass $3=new pass
    ./check_passwd $1 $2
    if [ $? == 0 ]; then
    # echo "everything ok to change password"
    usermod -p $(echo $3 | openssl passwd -1 -stdin) $1
    echo "Password changed successfully."
    else
    echo "Current password incorrect."
    fi

    Line three reads "./check_passwd $1 $2". is it saying that it isn't able to run the file check_passwd and pass it the variables?

    I have read some of the posts on this thread and have found that some users are saying I need to run my HS3 install under a separate user named "homeseer". is this the case? are there any other Users I need to add? do I need to make the account that loads HS3 run as admin?
    Last edited by Kerat; October 2, 2016, 10:55 PM.

    Leave a comment:


  • ARA
    replied
    Aha, an Ansi HTML Adapter! And now we have well formatted output (works on OpenSuSE too). Thanks for finding that Pete. It makes sense that it would be a holdover from the Zee.

    -Alex

    Leave a comment:

Working...
X