Password Protection for Folders HOW-TO

Discuss third-party additions, plugins and translations for PS3 Media Server

Password Protection for Folders HOW-TO

Postby knicknak » Thu Mar 04, 2010 9:14 am

I'm going to create a windows-based program that lets you password protect folders that you want to access via ps3 media server.
Basically it will let you create a "restricted" folder on your windows file system, and on the XMB it will let you enter a password to gain access to your restricted folder.

I've done this manually on my own system and verified it works - but it was painful to do it manually.
I will most likely write this utility in C#

Any suggestions on where to host the executable for downloading (must be free)?

Which forum is appropriate to announce, discuss, release this in?
Last edited by knicknak on Fri Mar 05, 2010 9:04 am, edited 1 time in total.
User avatar
knicknak
 
Posts: 67
Joined: Wed Apr 15, 2009 1:52 am

Re: Password Protection for Folders

Postby knicknak » Thu Mar 04, 2010 11:55 am

So I did some more testing and found some good news and some bad news.

Bad News:
password length is limited to 6 or less characters depending on how you want to use this (4 or 5 works best).

Good News:
A batch file can set this all up - no need for an exe
password can use a lot of different characters, so it can be very hard to figure out. I don't know of any automated brute force way of guessing it through the XMB - so it should be ok.

I'm going to clean up and comment the batch file and I'll post tomorrow.
User avatar
knicknak
 
Posts: 67
Joined: Wed Apr 15, 2009 1:52 am

Re: Password Protection for Folders

Postby knicknak » Fri Mar 05, 2010 8:45 am

Copy and paste this into notepad, edit for your custom password and folders, save the file as CreatePassword.bat
Double-click or run from the command line.

Note: This batch file creates circular junctions, some programs that scan folders (backup, virus scan) may get confused if they don't handle junctions well.

Enjoy

:: PS3 Media Server compatible password scheme
:: Author: Knicknak
::
:: Use: Edit this file with your custom information
:: Run this file to create the password scheme
:: Share \#EnterPassword# on PS3 Media Server
:: From your PS3 navigate through the following sequence: #EnterPassword#->Password One letter at a time->#submit#
::
:: Caveats: The PS3 remembers the path you took when entering the password, so after you are done with the files in the
:: protected folder, you need to either:
:: - Reset your Media Server (#-Video Settings-#, Restart HTTP Server)
:: OR
:: - Turn off the PS3
:: OR
:: - Get rid of the path by navigating backwards using a sequence like this:
:: Circle, !, Circle, Circle, !, Circle, Circle, ! ... back to the root media server folder
::
:: The PS3 has a limitation of 7 levels of folders
:: This means that your password length is limited by the number of folders you plan to use
:: e.g. #EnterPassword#->p->s->w->r->d->#submit# is 7 levels deep, so no subfolders with a 5 charater password
:: #EnterPassword#->p->s->w->d->#submit# is 6 levels deep, so you could have a layer of subfolders.
::
:: PS3 Media Servers's #transcode# is a subfolder, so if you need to access this for your media you need to
:: factor that into your password length
::
::
:: This batch file is designed for Vista and Windows 7 which include mklink
::
:: For XP you can download the Windows Server 2003 Resource Kit Tools
:: and modify the junction and options to be linkd and blank


:: Set restrcitedDir to the existing folder on your file system that you want to protect
SET restrcitedDir="\Restricted Folder"

:: Set password to your own characters seperated by commas. 5 characters or less - see why above.
SET password=p,s,w,d

:: Default is for Vista/Windows 7, for XP SET junction=linkd SET options=
SET junction=mklink
SET options=/J

SET pwdDir=\#EnterPassword#
SET chars=#submit#,!,#,$,%%,@,[,],-,_,`,{,},~,+,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,1,2,3,4,5,6,7,8,9,0


mkdir %pwdDir%
cd %pwdDir%

for %%a in (%password%) do (
mkdir %%a
for %%b in (%chars%) do IF NOT EXIST %%b %junction% %options% %%b %pwdDir%
cd %%a
)

%junction% %options% #submit# %restrcitedDir%
for %%a in (%chars%) do IF NOT EXIST %%a %junction% %options% %%a %pwdDir%

:: If you have subfolders that you want to link to your protected folder, add them below
:: realize that having a level of subfolders reduces the length of the password allowed
cd %restrcitedDir%
REM %junction% %options% AnyFoldername PathToAnyFolder
REM %junction% %options% AnotherFoldername PathToAnotherFolder
User avatar
knicknak
 
Posts: 67
Joined: Wed Apr 15, 2009 1:52 am

Re: Password Protection for Folders HOW-TO

Postby knicknak » Mon Mar 15, 2010 5:53 am

BTW I have a feeling PS3 Media Server could build in this "password protection" if it implemented the scheme I've demonstrated with "virtual folders" similar to the way #--TRANSCODE--# and #-Video Settings-#->Subtitles are implemented.
User avatar
knicknak
 
Posts: 67
Joined: Wed Apr 15, 2009 1:52 am

Re: Password Protection for Folders HOW-TO

Postby edrikk » Mon Mar 15, 2010 7:54 pm

One thing that could also be done is as follows (All password protected items must be in the same tree branch for this to work)... Items put into a specific directory will result in the following behavior:

- The user will define a password for this "special" directory in PMS.
- The items are not visible in any of the normal views.
- A tree branch, with top node (the name of which the user will define) will be created.
- Below that virtual top node, PMS will create a list of virtual nodes 0-9 and A-Z. Under each of those nodes, the same will be done (0-9, A-Z). For performance reasons, maybe limit the depth of this branch.

The user can get to their files by selecting/spelling out the password on the client side. Basically, the tree path to get to the files is the password.


This is clearly not true security, but I'd say it's fairly close for what we have here.
edrikk
 
Posts: 15
Joined: Wed Jun 24, 2009 6:38 pm

Re: Password Protection for Folders HOW-TO

Postby MorPhiend » Mon Jan 31, 2011 4:17 am

Great idea! Is there a built in way to do this yet? I'm new to PS3MS.

Well, I created the batch file and ran it with your default password and just a drive letter just to see it work. Then I edited the file to the specific folder on the drive I wanted and a new password, saved it and ran it again. But the PS3 doesn't recognize the new password. If I use the original default password, it still works and takes me back to the original drive that I had tied out. How do I get the PS3/PS3MS to recognize the new parameters I want? Thanks for any help.
MorPhiend
 
Posts: 1
Joined: Mon Jan 31, 2011 4:12 am

Re: Password Protection for Folders HOW-TO

Postby N031 » Thu Dec 29, 2011 5:38 am

Can you upload the Bat file? or Atleast highlight what has to be copied and pasted into the note pad? Or make a tutorial, for the less computer savy people. I am computer Savy, but you lost me completely in this post lol.
N031
 
Posts: 1
Joined: Thu Dec 29, 2011 5:36 am

Re: Password Protection for Folders HOW-TO

Postby slee1812 » Sat Jan 14, 2012 10:35 pm

Attached is a bat file which works for me. I left the default password of pswd. Just unzip and run the bat file.
Attachments
createpassword.zip
(1.31 KiB) Downloaded 456 times
slee1812
 
Posts: 4
Joined: Sat Jan 14, 2012 8:13 pm

Re: Password Protection for Folders HOW-TO

Postby knicknak » Wed Jan 18, 2012 12:02 am

Well, I created the batch file and ran it with your default password and just a drive letter just to see it work. Then I edited the file to the specific folder on the drive I wanted and a new password, saved it and ran it again. But the PS3 doesn't recognize the new password. If I use the original default password, it still works and takes me back to the original drive that I had tied out. How do I get the PS3/PS3MS to recognize the new parameters I want? Thanks for any help.


So if you want to "change" the password after running this previously, you would need to delete the #EnterPassword# folder and re-run the batch file. This will re-create all the links with your new password.
User avatar
knicknak
 
Posts: 67
Joined: Wed Apr 15, 2009 1:52 am

PS3 Media Server Password

Postby shaoen01 » Sat Jun 30, 2012 2:45 am

Hi,

I was following the instructions on how to enable password for folders via batch file in PS3 Media Server, but i have some questions on how it works.

Reference Link: http://www.ps3mediaserver.org/forum/viewtopic.php?f=2&t=5868

So i have ran the batch file from the link below and i see the EnterPassword folder. I have shared it out so my PS3 is able to see that folder. But i am not sure how does it protect the folder that i want? So say i want to protect F:\Folder1 and i included that in the batch file and ran it.

After restarting the PS3 Media Server on my desktop computer and PS3, i am still able to navigate to the folder. Am i suppose to be prompted to enter a password, etc? I am a bit confused on how does this password protect my folder?
shaoen01
 
Posts: 1
Joined: Sat Jun 30, 2012 2:27 am

Next

Return to Additions and Plugins

Who is online

Users browsing this forum: Google [Bot] and 8 guests