1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WORKING - Password Protecting the Web Interface

Discussion in 'HD/HDR-FOX T2 Customised Firmware' started by TomT, Jul 30, 2011.

  1. TomT

    TomT Member

    Hi
    I wanted to password protect the web interface so I've been having a read on Mongoose and now I have it working.

    It's quite simple to do and can be removed if needed. All this does is create a .htpasswd file in the root of the web directory. This is a hidden file, but can be delete if it goes wrong !!

    I don't know if it will have any impact on the use of the 'adapted' feature set, but I'm sure some will advise.

    THIS HAS WORKED FOR ME, I TAKE NO RESPONSIBILITY IF IT GOES WRONG FOR YOU. !!

    I did this by telnet and will asume you know how to access your HDR-FOX T2 via telnet.
    ( if not post and I'll try to help )

    1. change to the web directory on your Humax box.
    Code:
    cd /mod/var/mongoose/html/
    2. check no .htpasswd file already exists. ( just in case )
    Code:
    ls -alsh
    If you already have a .htpasswd file you should see it listed.
    Code:
     cat .htpasswd
    Will show you the contents of this file.

    3. create the .htpasswd file
    By default the Humax's authentication domain is 'mydomain.com'. So to add a user called 'admin' with the password 'pass' run the following command.

    Code:
    /mnt/hd2/mod/sbin/mongoose -A ./.htpasswd mydomain.com admin pass
    You can check the .htpasswd file has been created and view it's contents using the ls and cat commands above.

    Now when you access you Humax via your browser you should be asked to enter the username and password for 'mydomain.com'

    You can add multiple usernames and password to the .htpasswd file by repeating the above command changing admin & pass as needed.

    If this doesn't work or you need to remove the authentication request, this can be done using :
    Code:
    rm .htpasswd
    I haven't tried this, BUT !! It appears you can change the authentication domain from 'mydomain.com' by editing the mongoose.conf located in
    Code:
    /mnt/hd2/mod/etc
    Adding the following should change the domain to localhost:
    Code:
    authentication_domain    localhost
    If you do this you would need to change 'mydomain.com' to localhost when you create your username and password. eg:
    Code:
    /mnt/hd2/mod/sbin/mongoose -A ./.htpasswd localhost admin pass
    Hope this helps :)
     
    MattC and Black Hole like this.
  2. Black Hole

    Black Hole Felonius Gru

    Brill! The BYTs strike again!
     
  3. TomT

    TomT Member

    BYT's ????
     
  4. fenlander

    fenlander Active Member

    Bright Young Things

    BH: have you added this to the GoT?
     
  5. TomT

    TomT Member

    hmm.. only 0ne of those words is correct 'things' :)
    Have I added it to what ?
     
  6. fenlander

    fenlander Active Member

    The Glossary of Terms of course (Black Hole speak..) :)
     
  7. Black Hole

    Black Hole Felonius Gru

    BYT: I was considering it, but had decided against. Shall I??

    As a tribute to the labours of all those involved, I have!
     
  8. TomT

    TomT Member

    I hope that means it worked for you !!

    Re reading my post, It does seem long... hopefully that won't put any one off.
    It is VERY simple to do :)
     
  9. Tawny

    Tawny Member

    Thanks for this, easy to set up and very handy.
     
  10. Black Hole

    Black Hole Felonius Gru

    Who? Me?? Nah, not yet...
     
  11. TomT

    TomT Member

    sorry, I'd read your post that you'd tried it !!

    Just me then ? :(
     
  12. Tawny

    Tawny Member

    No, I've set up and had it working.
     
  13. TomT

    TomT Member

    :cool: glad it word for you !
     
  14. Black Hole

    Black Hole Felonius Gru

    Actually, I don't need to password my interface. Sorry. But I admire your efforts :)