Help with Prey - calling Malcolmlewis and oldcpu

I’ve just come across the stolen laptop thread where Prey was discussed to help track a stolen laptop. Since I’m going to a trip with my laptop I thought I’d try Prey. I installed it from the link Malcom posted but cannot figure out how to configure it. I ran the menu item which asked for my root password after which nothing seemed to happen. How do I add the API and key? In the Prey web control panel it says my device is unverified.

oldcpu, was there anything extra you had to do to make this work?

OK, just an update after a little more playing around. I found the config file and manually added the api and key. Now when I run Prey in check mode I get the following output.

 -- CHECK MODE ENABLED.

 ### PREY 0.4 spreads its wings!                                                  
 ### Linux suntp001 2.6.31.12-0.1-desktop #1 SMP PREEMPT 2010-01-27 08:20:11 +0100 i686 i686 i386 GNU/Linux                                                         

 -- Looking for connection...
 -- Got network connection!

 >> Verifying Prey installation...

 -- Checking if cron daemon is running...
 -- Cron daemon found.
 -- Checking for crontab entry...
no crontab for root
 !! Not found!
 -> It seems Prey's crontab entry was removed after installation. Please set again the running interval.

 >> Verifying API and Device keys...

 ** API key is valid. Your user account is correctly set up.
 ** Device key is valid. Good. Current status is unverified.

So Prey gets a network connection so I assume it’s getting through the firewall fine and the api and key are valid. The message about the crontab entry for root not found is puzzling. How do I get the crontab entry back? reinstalling didn’t help.

suse tpx60s wrote:
> reinstalling didn’t help.

i can help directly, but i can mention that reinstalling is a bad
habit learned from using other operating systems…

it should never help…

the only way it can help is if the whole thing works by chance and
sometimes it works right and sometimes not…like that other system
where you learned that technique… :slight_smile:

operators of this system prefer reading the available documentation
and asking the helpers BEFORE trying everything you can think of and
then reinstalling and trying some more stuff and repeating and
reinstalling and . . .

or, just Google, to find the source of Prey, complete with
information, instructions, and a mail list of helpers:
http://preyproject.com/
http://icculus.org/prey/


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]

Well thanks for taking the time to reply, but it wasn’t very helpful.

I did read the documentation and to quote the documentation

If you get any response stating that your API or Device keys are invalid, you should reinstall Prey.
Even when I used the ‘other’ operating system I didn’t just resort to re-installing the software to make it work so your assumptions are not correct.

Also, the second link you posted is appears to be some game and not the application I am referring to.

My call for help was directed to Malcolmlewis and oldcpu, hence their names in the title of the thread as Malcolm very kindly packaged Prey for oS and oldcpu seemed to have got it working properly.

From Malcolm’s post he says

OK, I found the proper prey configurator and have updated the build as using sysconfig didn’t seem to save the changes for me. So if you have installed it please update and run the menu item to add your key/api
again.
This doesn’t appear to work for me and appears to be a packaging thing, hence my call for help from Malcom. In that thread oldcpu successfully tested it so I was hoping he could shed a little more light on what my problem may be.

Hi
Still on first cup of coffee here :wink: You can check the cronjob by
opening a terminal and;


su -
crontab -l

That’s a lower case L (for list)


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.13-0.5-default
up 1 day 12:14, 2 users, load average: 0.08, 0.13, 0.12
GPU GeForce 8600 GTS Silent - Driver Version: 256.53

Thanks Malcom. It appears that the cron job does exist now. I have rebooted (did an update which included a kernel update) since my last attempt at trying to get Prey working and now it running Prey in check mode it passes all checks.

Do you know why the configurator doesn’t work as you described? I have a prey Configurator item listed in my menus but it doesn’t seem to do anything apart from ask for a root password.

Hi
Still on first cup of coffee here :wink: You can check the cronjob by
opening a terminal and;


su -
crontab -l

That’s a lower case L (for list)
[/QUOTE]
Hi
I see there is an update, so I’ve updated the OBS, version 0.4.3 should
be there soon…


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.13-0.5-default
up 1 day 12:33, 3 users, load average: 0.05, 0.26, 0.19
GPU GeForce 8600 GTS Silent - Driver Version: 256.53

Hi
<onto second coffee>
Do you have mail as root?


su -
mail

I need to install myself and have a look…

I’m tempted to move the config out of where it is and put in /etc
somewhere and make it noreplace so it doesn’t get over written on a
fresh install. Have been working with the developers and they have fixed
some things, so there is progress :wink:


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.13-0.5-default
up 1 day 13:12, 3 users, load average: 0.81, 0.35, 0.17
GPU GeForce 8600 GTS Silent - Driver Version: 256.53

Yes there is mail.

All show the same message

Subject: Cron <root@xxxxxxxx> /usr/share/prey/prey.sh > /var/log/prey.log
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>
Message-Id: <20100908142020.2F21E4038C@suntp001.local>
Date: Wed,  8 Sep 2010 15:20:13 +0100 (BST)
which: no zenity in (/usr/bin:/bin:/usr/sbin:/sbin:/usr/share/prey/platform/linux/bin)
which: no kdesktop in (/usr/bin:/bin:/usr/sbin:/sbin:/usr/share/prey/platform/linux/bin)
which: no xfconf-query in (/usr/bin:/bin:/usr/sbin:/sbin:/usr/share/prey/platform/linux/bin)
Error setting value: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: /bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
)
Error setting value: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: /bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.
)

Unfortunately that lot doesn’t mean much to me.

I’ll wait and install the new version later and see what happens.

Hi
Me either, very strange. I’ve just done another update to patch the
path to the iwlist command.

Install the new version and see how that goes. I’m interested to see
how the prey-configurator window is for you. I’m on a netbook and it’s
all scrunched up… but you can edit the config file manually
(/usr/share/prey/config).


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.13-0.5-default
up 1 day 16:01, 4 users, load average: 0.12, 0.28, 0.18
GPU GeForce 8600 GTS Silent - Driver Version: 256.53

Good the geo location is working!!! It nailed the laptops location to
within a hundred feet or less…!!

The only thing not working is the desktop screenshot… still debugging


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.13-0.5-default
up 1 day 16:13, 4 users, load average: 0.00, 0.05, 0.08
GPU GeForce 8600 GTS Silent - Driver Version: 256.53

Hi
Me either, very strange. I’ve just done another update to patch the
path to the iwlist command.

Install the new version and see how that goes. I’m interested to see
how the prey-configurator window is for you. I’m on a netbook and it’s
all scrunched up… but you can edit the config file manually
(/usr/share/prey/config).

[/QUOTE]
Good the geo location is working!!! It nailed the laptops location to
within a hundred feet or less…!!

The only thing not working is the desktop screenshot… still debugging

[/QUOTE]
Hi
OK, finally have the screenshot working, I changed to using xwd (part
of xorg) so it will capture the desktop whether a user is logged in or
not…assuming there is an active internet connection to send the info
of course.

I’ve submitted my patches, so will wait and see the feedback, the
latest version is prey-0.4.3-7.1


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.32.13-0.5-default
up 1 day 21:22, 2 users, load average: 0.16, 0.10, 0.09
GPU GeForce 8600 GTS Silent - Driver Version: 256.53

Thanks for all your efforts. I’ll update and test and let you know how thongs go.

Morning Malcolm. I hope you’ve had your coffee :slight_smile:

I installed your latest build and either I’m missing something or it’s not properly working on my system.

The prey configurator works if I start it from the console as su. If I try starting it from the menu item as a user I get asked for the root password and then nothing happens.

The switching of desktops and alarm still don’t work for me. I get the alert message on the screen but that’s it. That was while logged in as a user. I then tried to see what happens when the laptop boos to simulate a thief starting it up after he swiped it. Basically nothing happened. I was expecting the alert message to come up once the KDE log-in prompt came up.

I’m happy to report that the GEO location works and was scarily accurate. It nailed my building pretty much.

Am I misunderstanding how this is supposed to work with regards to the alerts, screen switching and alarm? Do these modules not run during or after boot but before a user logs in?

This is what my prey configurator looks like. As you can see some of the text is truncated.
http://i198.photobucket.com/albums/aa111/sklipikish/openSUSE/th_b7c5603a.png](http://i198.photobucket.com/albums/aa111/sklipikish/openSUSE/b7c5603a.png)

EDIT: Forgot to add the prey.log. It seems that the modules run but there is nothing coming from the alarm and screen switching modules.

e36m
 ### PREY 0.4.3 spreads its wings!
 ### Linux suntp001 2.6.31.12-0.2-desktop #1 SMP PREEMPT 2010-03-16 21:25:39 +0100 i686 i686 i386 GNU/Linuxe0m

 -- Looking for connection...
 -- Got network connection!
 -- Checking URL...

e1m >> Reading configuration...e0m

 -- Frequency in sync.

e1m >> Reading module configuration...e0m

 -- Got instructions for network module.
 -- Got instructions for geo module.
 -- Got instructions for alarm module.
 ++ Queueing action for alarm module!
 -- Got instructions for alert module.
 ++ Queueing action for alert module!

e1m >> Verifying status...e0m

 -- Got status code 404!
 -- HOLY GUACAMOLE!!
 -- Running active report modules...

e1m >> Running network module!e0m

 -- Getting public IP address...
 ++ Adding trace for network: public_ip
 -- Getting private LAN IP address...
 ++ Adding trace for network: internal_ip
 -- Getting gateway IP address...
 ++ Adding trace for network: gateway_ip
 -- Getting MAC address, routing and Wifi info...
 ++ Adding trace for network: mac_address
 -- Getting list of nearby Wifi access points...
 ++ Adding trace for network: wifi_info
 -- Tracing our complete route to the Internet...
 ++ Adding trace for network: complete_trace

e1m >> Running geo module!e0m

 -- Trying to get list of nearby Wifi access points...
 -- Detected wireless device at wlan0.
 -- Got it! Now lets try to get a location fix...
 ++ Adding trace for geo: lat
 ++ Adding trace for geo: lng
 ++ Adding trace for geo: accuracy

e1m >> Sending report!e0m

 -- Packing all gathered traces...
 -- Posting data via http...
 -- Report successfully saved.
 -- 1131 bytes uploaded in 10.729 seconds, at 105.000 bytes/sec.
 -- Dropping all traces!

 -- Done! Happy hunting! :)
e1m >> Running pending actions...e0m
 -- Cleaning up!


e1m >> Running alarm module!e0m

 -- Creating pidfile for alarm's 10331...
 -- Sounding /usr/share/prey/modules/alarm/lib/siren.mp3!
 -- Action alarm exited with status 0.
 -- Removing pidfile...

e1m >> Running alert module!e0m

 -- Creating pidfile for alert's 10344...
 -- Showing the guy our alert message...
 -- Changing the wallpaper to alert him and nearby users...
 -- Action alert exited with status 1.
 -- Removing pidfile...
 -- No pending actions left. All done!

Hi
Ok, can you just run the command prey (as your user) from a terminal so can try and see what’s occurring.

Check if root has a crontab;


su -
crontab -l

If not can you run the following whilst still as root user;


/usr/share/prey/prey.sh

If you need to add your API and key this can be done manually by editing the config file;


kdesu kate /usr/share/prey/config

See how that goes, then can work on the alert side :wink:

Oh, forgot to add, I’ve already mentioned the configurator window to the devel;
Configurator screen not scrollable - Prey | Google Groups

Ok, I can run prey as a user no problem if I use the whole path, i.e. /usr/share/prey/prey.sh. If I try run it without the path I get

~> prey
kdesu(11131)/kdesu (kdelibs) KDESu::PtyProcess::exec:  /usr/src/packages/BUILD/kdelibs-4.4.4/kdesu/process.cpp : 295 ]  Running "/bin/su"
kdesu(11131)/kdesu (kdelibs) KDESu::SuProcess::ConverseSU:  /usr/src/packages/BUILD/kdelibs-4.4.4/kdesu/su.cpp : 259 ]  Read line "Password: "
kdesu(11131)/kdesu (kdelibs) KDESu::PtyProcess::exec:  /usr/src/packages/BUILD/kdelibs-4.4.4/kdesu/process.cpp : 295 ]  Running "/bin/su"
kdesu(11131)/kdesu (kdelibs) KDESu::SuProcess::ConverseSU:  /usr/src/packages/BUILD/kdelibs-4.4.4/kdesu/su.cpp : 259 ]  Read line "Password: "
kdesu(11131)/kdesu (kdelibs) KDESu::PtyProcess::WaitSlave:  /usr/src/packages/BUILD/kdelibs-4.4.4/kdesu/process.cpp : 381 ]  Child pid 11141
kdesu(11131)/kdesu (kdelibs) KDESu::SuProcess::ConverseSU:  /usr/src/packages/BUILD/kdelibs-4.4.4/kdesu/su.cpp : 259 ]  Read line ""
kdesu(11131)/kdesu (kdelibs) KDESu::SuProcess::ConverseSU:  /usr/src/packages/BUILD/kdelibs-4.4.4/kdesu/su.cpp : 259 ]  Read line "kdesu_stub"

Crontab exists for root

# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (- installed on Wed Sep  8 11:03:03 2010)
# (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
*/20 * * * * /usr/share/prey/prey.sh > /var/log/prey.log

API and key are correct and entered in the config file. I did this manually before you got the configurator working. Prey passes the checks and confirms api and key are correct.

Everything seems to work fine from the point that Prey recognises when I mark the laptop as missing and generates a report. What is not working are the alarm and desktop switching. The alert message works and displays the “this laptop has been stolen” message.I haven’t tried the security module yet.

Is Prey supposed to run at boot time, i.e. before the user has logged in?

I am actually going to be leaving for my trip in a couple of hours so won’t be able to do much more testing until I get to a internet connection again at some point over the weekend hopefully. Thanks for your help so far.

Hi
Ok, that would indicate you don’t have xdg-utils installed as I use this rather than kdesu or gnomesu.

Just check and remove a user cronjob :wink:

Yes it’s enabled as soon as crond starts… you just need a network connection to send the report…

Gosh guys … I’m currently in Vietnam, using the Hotel wireless just before going to bed. Internet access is mostly Internet and random during my holiday.

Prey mostly ‘just worked’ for me in setting up.

I did not edit any config files. Instead I used the config program that comes with prey as packaged by Malcolm.

Note to run it , if using kde you need to use “kdesu prey” (or what ever it is called, I can’t remember, and I’m using my wife’s 7 year old laptop which does not need prey - our prey fitted laptop is back in Bangkok Thailand).

I assume for gnome you would need to use “gnomesu prey” (or something like that).

I too have xdg-utils installed. Is this what is supposed to control the alarm sound and desktop wallpaper switching?

Just check and remove a user cronjob :wink:
Not sure what you’re referring to here but the only cron I have for prey is the root one.

Yes it’s enabled as soon as crond starts… you just need a network connection to send the report…
Yes now confirmed this works.

@oldcpu, did you check all the functionality, especially of the modules? Did the desktop wallpaper switching and alarm sound work for you?