Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

OS X 10.6.3 not running at login screen #14

Closed
BrianGilbert opened this issue Jun 11, 2010 · 14 comments
Closed

OS X 10.6.3 not running at login screen #14

BrianGilbert opened this issue Jun 11, 2010 · 14 comments

Comments

@BrianGilbert
Copy link

Is it possible to have this running at the login screen, or do I need an account with no password set for it to activate properly?

@BrianCanFixIT
Copy link

As far as I can tell prey runs as a root cron job, it should not need someone to be logged in... but I have not delved into the code too much.
How could you tell that it was not running?

@BrianGilbert
Copy link
Author

I set the laptop as missing and none of the alerts would play or image be captured from the inbuilt webcam

@BrianCanFixIT
Copy link

Just to verify,
1-When a user is logged in to the device and the device is marked as stolen you were able to get this information.
2-When no user was logged into the device and the device is marked as stolen you were not able to get this information.

Did it work if you were logged in, but at the login window?
I'll put it on my 10.6.3 and try all three scenarios now.

@BrianGilbert
Copy link
Author

1- correct
2- correct
3- don't recall

@BrianCanFixIT
Copy link

Are you on wireless?

I have had issues with the Mac's wireless disconnecting when I either go to the login screen (when multi user is on), or when I logout (even if I have the setting enabled to keep me logged in to wireless when logged out).

When I was on a wireless only connection I was able to reproduce this issue. I believe that the problem lies in the fact that the wireless keys are stored in the local user's profile, and thus the wireless is not connected when the use logs out, or goes to the login screen.

A workaround would be to be on a wired connection, or to add a wireless password at a system, or login-window level.

@BrianCanFixIT
Copy link

I was not able to reproduce this issue on a wired connection.

@BrianGilbert
Copy link
Author

I tested originally on a wired connection.. did you test on clean boot if it worked?

@BrianCanFixIT
Copy link

Worked on a cold boot, mid boot (even with no GUI up yet).
Worked on a warm boot.
Worked on a logout.

Do you have the latest version of prey? (sorry I have to ask)
How comfortable are you with editing cron, and do you have full admin privileges?

@BrianGilbert
Copy link
Author

There may heve been new releases since I posted the issue.

I have admin, and reasonably comfortable with editing cron.

@BrianCanFixIT
Copy link

Try the latest version, if that doesn't work then try:
1: Running prey manually from the terminal as root:

sudo su
whoami
/usr/share/prey/prey.sh

Then look for errors. (feel free to post the output)

or

2: Edit the root's cron to be

/5 * * * * /usr/share/prey/prey.sh &> /var/log/prey.log

This will cause prey to run every 5 minutes and to log to */var/log/prey.log
.
Then you can tail the log with:
tail -f /var/log/prey.log
from the terminal (again, feel free to post the output).

@BrianGilbert
Copy link
Author

I Installed Prey 0.3.73, now on Snow Leopard 10.6.4

With Missing set to No:

sh-3.2# /usr/share/prey/prey.sh 
\E[36m
 ### PREY 0.3.73 spreads its wings!
 ### Darwin dyn-changed.its.university.edu.au 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386\E[0m

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

 >> Reading configuration...

 -- Delay in sync.

 >> Reading module configuration...

 ** Got instructions for alert module.

 >> Verifying status...

 -- Got status code 200!
 -- Nothing to worry about. :)

With Missing set to yes:

sh-3.2# /usr/share/prey/prey.sh 
\E[36m
 ### PREY 0.3.73 spreads its wings!
 ### Darwin dyn-changed.its.university.edu.au 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386\E[0m

 -- Looking for connection...
 -- Trying alternate method...
 -- Got network connection!
 -- Checking URL...
 -- Got XML. Parsing...

^[[1m >> Reading configuration...^[[0m

 -- Delay in sync.

^[[1m >> Reading module configuration...^[[0m

 ** Got instructions for network module.
 ** Got instructions for session module.
 ** Got instructions for webcam module.
 ** Got instructions for geo module.
 ** Got instructions for alert module.

^[[1m >> Verifying status...^[[0m

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

^[[1m >> Running network module!^[[0m

 -- 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
 -- Tracing our complete route to the Internet...
 ++ Adding trace for network: complete_trace

^[[1m >> Running session module!^[[0m

 -- Getting current logged in user name...
 ++ Adding trace for session: logged_user
 -- Getting computer uptime and a list of running programs...
 ++ Adding trace for session: uptime
 -- Grabbing screenshot of the running desktop...
 ++ Adding file for session: screenshot -> /tmp/p24177/prey-screenshot.jpg

^[[1m >> Running webcam module!^[[0m

 -- Taking a picture of the impostor...
 ++ Adding file for webcam: picture -> /tmp/p24177/prey-picture.jpg

^[[1m >> Running geo module!^[[0m

 -- Trying to get list of nearby Wifi access points...
 -- 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

^[[1m >> Running alert module!^[[0m

 -- Showing the guy our alert message...
 -- Saying the message out loud...

^[[1m >> Sending report!^[[0m

 -- Packing all gathered traces...
 -- Posting data via http...
button returned:OK.
 -- Report successfully saved.
 -- 1483859 bytes uploaded in 8.255 seconds, at 179757.000 bytes/sec.
 -- Dropping all traces!
 -- Removed /tmp/p24177/prey-screenshot.jpg
 -- Removed /tmp/p24177/prey-picture.jpg

 -- Done! Happy hunting! :)

But if I reboot the computer Prey does not capture anything until I have logged in, I tried disabling Little Snitch altogether and it made no difference

@BrianCanFixIT
Copy link

can you give me the output for the following command:

sudo su
whoami
crontab -l

Than can you, reboot your mac, ssh in to your mac, login as root, and run prey manually.

@BrianGilbert
Copy link
Author

macbook:~ realityloopf$ sudo su
sh-3.2# whoami
root
sh-3.2# crontab -l

*/5 * * * * /usr/share/prey/prey.sh &> /var/log/prey.log

After ssh'ing in as root on reboot and running prey from SSH I get the following:

sh-3.2# /usr/share/prey/prey.sh
\E[36m
 ### PREY 0.3.73 spreads its wings!
 ### Darwin dyn-130-194-53-103.its.monash.edu.au 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386\E[0m

 -- Looking for connection...

It just stalls here, as soon as I enter my password at login prompt it continues with:

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

then stalls until computer finishes starting up, after which I got:

 -- Couldn't determine Content-Type for response. If you're using the Control Panel, please check your settings.

 >> Verifying status...

 -- Got status code !
 -- Nothing to worry about. :)

sh-3.2# 

@drewreece
Copy link
Contributor

I'm unsure if this is still an issue.

I have just tried with OS 10.6.6 and Prey 0.5.1. I connected to a wifi network & rebooted to the login window. I used the run on demand feature to run Prey from the control panel. It took a screenshot & webcam image & set the reports ok.

I did have the option to 'disconnect wifi on logout' OFF. It is worth checking that setting in the advanced section of the network preferences. Even with this turned ON the Mac still connected to the wifi network and connected to the Control Panel when at the login window.

Can you say if this is still happening with the latest Prey.

PS a few tips on testing this…
On the login window click the grey hostname (below Mac OS X text) until it shows an IP address - An IP that is not 169.x.x.x indicates a connection to a network.
The Mac will also show up in the sidebar of another if it has some sharing services active (I had AFP & screen sharing on).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants