Password for Piratebox android

Posted by mmo 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
mmo
Password for Piratebox android
December 24, 2014 08:15AM
hi, I would like to add a password to my pirate box on my android phone. I don't see an option for it though. Any help please?

Thx
Re: Password for Piratebox android
December 26, 2014 04:54PM
Hi,

the PirateBox is not designed to have a password, but it's possible.

You can do this like this ...

#1 Choose "Conent to SD" to copy all the PirateBox files to the external storage directory. Normally this should be /sdcard/piratebox.

#2 Edit the /sdcard/piratebox/conf/handler.xml. Add the authentication handler definition right below the <handlers /> tag:

<handlers>

  <handler status="inactive">
    <name>Basic Auth Handler</name>
    <description>Basic Auth Handler. Configuration resides in [PAW_HOME]/webconf/auth</description>
    <removable>true</removable>
    <id>auth</id>
    <files/>
    <params>
      <param name="auth.class" value="org.paw.handler.BasicAuthHandler" />
      <param name="auth.confdir" value="[PAW_HOME]/webconf/auth" />
    </params>
  </handler>

 ...

</handlers>


#3 Create the directory /sdcard/piratebox/webconf/

#4 Create the file /sdcard/piratebox/webconf/dirs.conf with the following content:

# directory:auth-type:realm:user ( separate multiple users by "," )
:basic: PirateBox Login:pirate


This will set the username to "pirate". The name can be changed of course.

#5 Now you have to create a crypted password entry. You can use the following web page to create the line (Make sure to select "crypt" ).

http://www.htpasswdgenerator.de/

Put the generated line inside the file /sdcard/piratebox/webconf/users.conf. This should look something like this:

# username:crypted-password
pirate:MHC0zDP95aesF

#6 Now restart the PirateBox

The PirateBox should now be password protected. To make the configuration permanent you can de-select "Enable Updates" inside the preferences.

Hope that helps ...

Bye
Jochen



Edited 1 time(s). Last edit at 04/17/2015 08:14AM by joschi70.
I am having an issue with Step 2: - I can't find a <handler /> tag in the handler.xml file.

I assume this should be place the tags and code between <handler> and </handler> at the top, just below the <handlers> tag?

Assuming that, I have not been able to successfully enable a WPA2 Wifi password. Any ideas? (Running on unlocked spring galaxy s2 - works great with standard configuration btw!)
Re: Password for Piratebox android
April 17, 2015 08:21AM
Thanks!
You are correct, it should read <handlers />.
Has been corrected ...

When the PirateBox starts up, it always creates an open hotspot.
There is currently no way to change that.
Random dork
Re: Password for Piratebox android
February 06, 2018 07:22PM
joschi70 Wrote:
-------------------------------------------------------
> When the PirateBox starts up, it always creates an
> open hotspot.
> There is currently no way to change that.

Quote

When the PirateBox starts up, it always creates an open hotspot.
There is currently no way to change that.
On version 0.5.8 (beta) there is! Ans you don't have to monkey around with xml files or anything like that.

- Configure your device's wifi hotspot function as you would normally, (hotspot name, password, WPA PSK)
- Configure your Piratebox with Autostart AP = ON and Configure AP = OFF.
- If you start Piratebox, it will turn on the device's hotspot and use that with all it's settings, including password.

This works for me on all devices I tried (a Lollipop Asus tablet and A Jellybean Huawei phone).
Furthermore, you can also run an FTP server once the pirate box is on. I use "Ftp server" by developer "The Olive Tree".
If you run the ftp server on port 2221 and left the Piratebox domain name at default, then connecting devices can see the FTP server on [pirate.box].
Re: Password for Piratebox android
February 15, 2018 12:01AM
It seems possible if you do it, I will go try it myself.