Jump to content
Legomaniac

Cow Milking Robot Hacks/Mods X11

Recommended Posts

31 minutes ago, twolelys said:

I can get to the user login in through ctrl + alt + F1,  F2 gets me back to main screen, but lely for login and password dont work for me, almost 8 yr lely a4.

You're not the only one with this problem. Our A4s are 5 years old and the password is not 'lely' on them either. I have not been able to log in yet. 

Share this post


Link to post
Share on other sites
On 2/19/2020 at 7:41 PM, Legomaniac said:

You're not the only one with this problem. Our A4s are 5 years old and the password is not 'lely' on them either. I have not been able to log in yet. 

Yeah same here (4 years old A4), I can SSH into the robot or access the terminal through the USB port directly, but I can't login.

lely - lely
lely - lelylely
lely - admin
lely - Lely
lely - LELY
lely - service
service - service
service - lely
etc.

 

 

Share this post


Link to post
Share on other sites

Wait, might have something. While digging in some of their tools that are left on the PC I found root / lely123. 

So now I have root access to the elink, but my Linux terminal knowledge is limited. Since other users seemed to login using Lely I figured I should go there as well. Found a folder called x11vnc there, but I can't open it from terminal.

Anyone else cares to follow up on this?

 

login as: root
root@10.4.1.102's password:
~ # pwd
/home/root
~ # cd ..
/home # cd..
-sh: cd..: not found
/home # cd ..
/ # pwd
/
/ # ls
bin   boot  dev   etc   home  lib   mnt   proc  sbin  sys   tmp   usr   var
/ # cd usr
/usr # cd lely
-sh: cd: can't cd to lely
/usr # cd Lely
/usr/Lely # ls
AGS                  Ax_A_RCS             RCS.start
AGS.start            Ax_A_XLinkUpdater    Software
AURS                 DoUpdate             VNC.start
AURS.start           LDNTranslator        Version.txt
Ax_A_1024x768.qss    LDNTranslator.reset  XLinkUpdater
Ax_A_640x480.qss     LDNTranslator.start  XLinkUpdater.start
Ax_A_AGS             LFWTimeServer        bootNetConf
Ax_A_AURS            LFWTimeServer.start  chrome.sh
Ax_A_LDNTranslator   PC2Target            killme
Ax_A_LFWTimeServer   Proxy                lelyboot
Ax_A_PC2Target       Proxy.start          setNetConf
Ax_A_Proxy           RCS                  vnc
/usr/Lely # cd vnc
/usr/Lely/vnc # ls
classes               libavahi-common.so.3  libssl.so.1.0.0
libavahi-client.so.3  libcrypto.so.1.0.0    x11vnc
/usr/Lely/vnc # cd x11vnc
-sh: cd: can't cd to x11vnc
/usr/Lely/vnc #
 

Share this post


Link to post
Share on other sites

I think since you already logged in using lely as user you ended up right were the executable for x11vnc is located. I'm logging in using root and I end up in /home/root

When you login using lely / lely and then type pwd, where does it say you are then?

 

 

Share this post


Link to post
Share on other sites

For the Linux savvy ones, I found something strange. So I can login as root and I can go pretty much anywhere when I SSH into one of the robot units (terminal only). Now there is a folder called /usr/Lely, which has these contents.

/usr/Lely # ls
AGS                  Ax_A_AGS             Ax_A_RCS             LFWTimeServer        RCS.start            bootNetConf
AGS.start            Ax_A_AURS            Ax_A_XLinkUpdater    LFWTimeServer.start  Software             chrome.sh
AURS                 Ax_A_LDNTranslator   DoUpdate             PC2Target            VNC.start            killme
AURS.start           Ax_A_LFWTimeServer   LDNTranslator        Proxy                Version.txt          lelyboot
Ax_A_1024x768.qss    Ax_A_PC2Target       LDNTranslator.reset  Proxy.start          XLinkUpdater         setNetConf
Ax_A_640x480.qss     Ax_A_Proxy           LDNTranslator.start  RCS                  XLinkUpdater.start   vnc
 

So I'd say there should be a user called Lely. However, when I check all the users using cat /etc/passwd, there's no user Lely to be found.

login as: root
root@10.4.1.102's password:
sh: xauth: not found
/ # cat /etc/passwd
root:WKOt7g4Zs.7W6:0:0:root:/home/root:/bin/sh
daemon:*:1:1:daemon:/usr/sbin:/bin/sh
bin:*:2:2:bin:/bin:/bin/sh
sys:*:3:3:sys:/dev:/bin/sh
sync:*:4:65534:sync:/bin:/bin/sync
games:*:5:60:games:/usr/games:/bin/sh
man:*:6:12:man:/var/cache/man:/bin/sh
lp:*:7:7:lp:/var/spool/lpd:/bin/sh
mail:*:8:8:mail:/var/mail:/bin/sh
news:*:9:9:news:/var/spool/news:/bin/sh
uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:*:13:13:proxy:/bin:/bin/sh
www-data:*:33:33:www-data:/var/www:/bin/sh
backup:*:34:34:backup:/var/backups:/bin/sh
list:*:38:38:Mailing List Manager:/var/list:/bin/sh
irc:*:39:39:ircd:/var/run/ircd:/bin/sh
gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:*:65534:65534:nobody:/nonexistent:/bin/sh
messagebus:x:42:64002:Linux User,,,:/var/run/dbus:/bin/sh
haldaemon:x:43:64:HAL:/var/run/hald:/bin/sh
polkituser:x:44:64004:polkituser:/var/run/polkit:/bin/sh
/ #
/ #
 

Anyone knows what's up?

Share this post


Link to post
Share on other sites
On 2/22/2020 at 5:33 PM, Sandman said:

For the Linux savvy ones, I found something strange. So I can login as root and I can go pretty much anywhere when I SSH into one of the robot units (terminal only). Now there is a folder called /usr/Lely, which has these contents.

/usr/Lely # ls
AGS                  Ax_A_AGS             Ax_A_RCS             LFWTimeServer        RCS.start            bootNetConf
AGS.start            Ax_A_AURS            Ax_A_XLinkUpdater    LFWTimeServer.start  Software             chrome.sh
AURS                 Ax_A_LDNTranslator   DoUpdate             PC2Target            VNC.start            killme
AURS.start           Ax_A_LFWTimeServer   LDNTranslator        Proxy                Version.txt          lelyboot
Ax_A_1024x768.qss    Ax_A_PC2Target       LDNTranslator.reset  Proxy.start          XLinkUpdater         setNetConf
Ax_A_640x480.qss     Ax_A_Proxy           LDNTranslator.start  RCS                  XLinkUpdater.start   vnc
 

So I'd say there should be a user called Lely. However, when I check all the users using cat /etc/passwd, there's no user Lely to be found.

login as: root
root@10.4.1.102's password:
sh: xauth: not found
/ # cat /etc/passwd
root:WKOt7g4Zs.7W6:0:0:root:/home/root:/bin/sh
daemon:*:1:1:daemon:/usr/sbin:/bin/sh
bin:*:2:2:bin:/bin:/bin/sh
sys:*:3:3:sys:/dev:/bin/sh
sync:*:4:65534:sync:/bin:/bin/sync
games:*:5:60:games:/usr/games:/bin/sh
man:*:6:12:man:/var/cache/man:/bin/sh
lp:*:7:7:lp:/var/spool/lpd:/bin/sh
mail:*:8:8:mail:/var/mail:/bin/sh
news:*:9:9:news:/var/spool/news:/bin/sh
uucp:*:10:10:uucp:/var/spool/uucp:/bin/sh
proxy:*:13:13:proxy:/bin:/bin/sh
www-data:*:33:33:www-data:/var/www:/bin/sh
backup:*:34:34:backup:/var/backups:/bin/sh
list:*:38:38:Mailing List Manager:/var/list:/bin/sh
irc:*:39:39:ircd:/var/run/ircd:/bin/sh
gnats:*:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh
nobody:*:65534:65534:nobody:/nonexistent:/bin/sh
messagebus:x:42:64002:Linux User,,,:/var/run/dbus:/bin/sh
haldaemon:x:43:64:HAL:/var/run/hald:/bin/sh
polkituser:x:44:64004:polkituser:/var/run/polkit:/bin/sh
/ #
/ #
 

Anyone knows what's up?

I will look into this!

Share this post


Link to post
Share on other sites
On 2/21/2020 at 6:29 AM, Sandman said:

Wait, might have something. While digging in some of their tools that are left on the PC I found root / lely123. 

 

Curious as to what tools you have left on your PC?

Share this post


Link to post
Share on other sites

So I have good news and bad news. I was able to login as root (Excellent news!) The bad news is, x11vnc that is installed on the robots doesn't seem compatible with input...

Quote

04/03/2020 08:50:08 WARNING: XTEST extension not available (either missing from
04/03/2020 08:50:08   display or client library libXtst missing at build time).
04/03/2020 08:50:08   MOST user input (pointer and keyboard) will be DISCARDED.
04/03/2020 08:50:08   If display does have XTEST, be sure to build x11vnc with
04/03/2020 08:50:08   a working libXtst build environment (e.g. libxtst-dev,
04/03/2020 08:50:08   or other packages).
04/03/2020 08:50:08 No XTEST extension, switching to -xwarppointer mode for
04/03/2020 08:50:08   pointer motion input.
 

Will continue to dig deeper. 

Share this post


Link to post
Share on other sites
On 3/4/2020 at 2:27 PM, Legomaniac said:

Curious as to what tools you have left on your PC?

Afraid that Lely will sometime check up on this and block access, but I was strolling through some Lely files and found this in an install.bat: 

echo Installing...
plink -ssh -m install.sh -pw lely123 root@%IP%

echo Done
pause
 

Bingo. 🙂

Share this post


Link to post
Share on other sites
On 3/4/2020 at 2:57 PM, Legomaniac said:

So I have good news and bad news. I was able to login as root (Excellent news!) The bad news is, x11vnc that is installed on the robots doesn't seem compatible with input...

Will continue to dig deeper. 

Indeed, x11vnc won't start as root. I was able to make a new user in terminal, but wasn't able to start x11vnc being that user either. Right now I'm looking for config files for the x11vnc that starts with the robot. Should be able to add a -noviewonly command line somewhere. In the same way I want to add a password to the VNC server as well, because of the following.

Using the netsh command in W10 and portforwarding on the router I was able to link my Android smartphone directly to the robotscreen. So using the VNC viewer on my Phone I'm able to directly view the robot screen. Now adding the possibility to control the screen would make live alot easier.

Share this post


Link to post
Share on other sites
Posted (edited)

X11VNC WILL start as root. It seems the software now on the robot is different than on older versions. You don't need to create a "Lely" user. 

/usr is for user-installed programs. /usr/Lely is for user installed programs of Lely category, any user can access them. 

The problem/reason X11vnc won't start is because it isn't linking correctly to a library. 

In order to get x11vnc to start run

export DISPLAY=:0

cd /usr/Lely/vnc

LD_LIBRARY_PATH=/usr/Lely/vnc

Then it will start for you. But it will still be read-only, because XTEST is missing. 

I'm working on it. 

The script they use to launch vnc is /usr/Lely/VNC.start I got those commands from in there

Edited by Legomaniac
more info

Share this post


Link to post
Share on other sites

Didn't know about the users, thanks!

Found the VNC.start indeed, mine says

Quote

 

/usr/Lely # cat VNC.start
#!/bin/sh
#noxdamage in x11vnc because we don't use it, but gives warnings.
#nopw in x11vnc, because we don't use a pw.
mkdir -p /var/Lely/VNC
cd /var/Lely/VNC

while test 1; do
   echo "loop!"
   sleep 1
   echo "starting..."
   ipaddress=`/sbin/ifconfig eth0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}'`
   echo $ipaddress
   DISPLAY=:0 LD_LIBRARY_PATH=/usr/Lely/vnc x11vnc -httpdir /usr/Lely/vnc/classes -httpport 8080 -desktop $ipaddress -nopw -noxdamage -noviewonly -forever
done

 

I inserted the -noviewonly and -forever myself, didn't help. When I look at the running processes X11 actually runs with those parameters but it's still viewonly.

  • Upvote 1

Share this post


Link to post
Share on other sites
Posted (edited)

Could it be an idea to use -xtrap?

From the x11vnc site: Use the DEC-XTRAP extension for keystroke and mouse input insertion. For use on legacy systems, e.g. X11R5, running an incomplete or missing XTEST extension. By default DEC-XTRAP will be used if XTEST server grab control is missing, use -xtrap to do the keystroke and mouse insertion via DEC-XTRAP as well.

 

Edit: tried -xtrap, didn't work.

Edited by Sandman

Share this post


Link to post
Share on other sites
On 3/6/2020 at 5:02 AM, Legomaniac said:

X11VNC WILL start as root. It seems the software now on the robot is different than on older versions. You don't need to create a "Lely" user. 

/usr is for user-installed programs. /usr/Lely is for user installed programs of Lely category, any user can access them. 

The problem/reason X11vnc won't start is because it isn't linking correctly to a library. 

In order to get x11vnc to start run

export DISPLAY=:0

cd /usr/Lely/vnc

LD_LIBRARY_PATH=/usr/Lely/vnc

Then it will start for you. But it will still be read-only, because XTEST is missing. 

I'm working on it. 

The script they use to launch vnc is /usr/Lely/VNC.start I got those commands from in there

Any news on this? Would it be possible to build and install an X11 VNC through terminal ourselves?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...