Set a password

das329717

Member
May 25, 2018
928
0
16
I only want to password-protect the rutorrent interface...

I read this guide http://forums.rutorrent.org/index.php?topic=19.0

Is it the only option how to achieve this?

Thanks!

PS: Im new to this smiley.gif
There are multiple options but they are all based on webserver auth.

you could make a mysql database for instance, cherokee has a PAM module, but no matter what you do, it will be based on the webserver.

Basic and Digest authentication are the 2 most popular.

also, another option, if you're using a single user setup, would be to use a ssl cerificate based auth setup. This is much more complicated but offers the best security and, doesn't require you to remember a password.

It's way too complicated for me to explain in a single guide though, but if you google it, you may be able to find the info.


If you are REALLY new to this, i highly recommend using cherokee, it has a GUI based setup and has a very easy wizard for adding passwords to a dir.

you just click "Default" on the "behavior" tab in your vhost, then click "security settings" and then set the auth type to "fixed list"

This gives you the option to set usernames/passwords and set the realm.

It's by far the easiest option. Otherwise, use the guide you linked, it's quite simple to follow.
 

jith45

Member
May 25, 2018
960
0
16
Thanks, I have lighttpd installed, so I will follow your guide. I will ask, if I get stuck somewhere smiley.gif
 

jith45

Member
May 25, 2018
960
0
16
Im back smiley.gif

Well, I tried to set up my lighttpd, but no luck,yet.

I attached my conf, maybe you can take a look at it...would be really kind!

I have a folder root/.htpasswd and in it I have the file moje.htpasswd with my login:password.

I want to protect my rutorrent webinterface, which is reachable under http://myDDNS.org:8081/rutorrent

What am I doing wrong?

Thanks!!
 

somus1735

Member
May 25, 2018
833
0
16
When u go to protect dir's in Lighttpd there is no need to put the url that your going to protect like u have in the config file. Take that out and just protect the dir that rutorrent is located in. For example, if your rutorrent install is in your server.document.root at /opt/share/www/rutorrent then in your Lightppd config file u would put this :

auth.require = ( "/rutorrent" =>

If rutorrent install is located in a different dir at /opt/share/www/user/rutorrent then u would put this :

auth.require = ( "/user/rutorrent" =>

Just put the dir rutorrent is installed in and u should be fine.
 

somus1735

Member
May 25, 2018
833
0
16
Yeah, thats where I found out, that it cant find my htpasswd

2010-03-15 16:50:40: (http_auth.c.231) opening plain-userfile /heslo/.htpasswd failed: No such file or directory
2010-03-15 16:50:40: (http_auth.c.872) get_password failed
 

dsouvik215

Member
May 25, 2018
896
0
16
Thanks, that helped, but I dont know why, my password is not accepted... sad.gif

what else could I have done wrong??

I have it in root/private/moje.htpasswd change the path in lighttpd.conf...
I also tried to put it in /opt/share/www/private/.htpasswd

no luck sad.gif
I created my password with the webcreator. It contains only one line Name:encryptedpassword

Any ideas?
 

shwetha17

Member
May 24, 2018
785
0
16
Thanks, that helped, but I dont know why, my password is not accepted... sad.gif

what else could I have done wrong??

I have it in root/private/moje.htpasswd change the path in lighttpd.conf...
I also tried to put it in /opt/share/www/private/.htpasswd

no luck sad.gif
I created my password with the webcreator. It contains only one line Name:encryptedpassword

Any ideas?
man, something weird is going on, i just tried to reply and it bugged out....anywyas

sometimes those online password generators fail.

If you REALLY want to be sure that your password is genuine download and install apache, then copy the htpasswd program, then delete apache
on ubuntu the process is as simple as this:
Code:
apt-get install apache2
cp /usr/bin/htpasswd /usr/local/bin
apt-get purge apache2
the format to use htpasswd is simple, for the first user do this:
Code:
htpasswd -c /some/dir/and/somefile someuser
then for each additional user
Code:
htpasswd /some/dir/and/somefile someotheruser
 

das329717

Member
May 25, 2018
928
0
16
After trying the .htpasswd file created with apache...still no luck

Im starting to be desperate...

My steps:

I have a text file which I save as ".htpasswd"
I place it into /opt/etc/lighttpd/
in lighttpd.conf:
Code:
auth.backend.htpasswd.userfile = "/opt/etc/lighttpd/.htpasswd"
Im still getting in the error log - No such file or directory.

What am I still doing wrong?huh.gif?

Thanks for your patience!!
 

somus1735

Member
May 25, 2018
833
0
16
no such file or directory is a pretty obvious error.

make sure you have the file named correctly and in the same location as you put in your config

for example, i tend to use something like
/usr/local/etc/users.htpasswd
 

dsouvik215

Member
May 25, 2018
896
0
16
Ok, I finally understood how the .htpasswd file should be named...

but still something shocked.gif

2010-03-15 23:09:43: (http_auth.c.880) password doesn't match for /rutorrent/ laser21 , IP: 192.168.0.199
 

somus1735

Member
May 25, 2018
833
0
16
Ok, I finally understood how the .htpasswd file should be named...

but still something shocked.gif

2010-03-15 23:09:43: (http_auth.c.880) password doesn't match for /rutorrent/ laser21 , IP: 192.168.0.199
lol, you have got to be over complicating this.

It's really simple

you set the password file with htpassword formated passwords
you set auth with that file


make sure the password file has htpasswd generated passwords. make sure your auth is set the htpasswd in the config.

make sure you are entering the password correct

make sure you have it all set right.
 

dsouvik215

Member
May 25, 2018
896
0
16
LOL...that was a journey smiley.gif

I tried making different htpasswd files, when it didnt work, so I changer the user in the conf file, and didnt change it back,...

So I took your advice and checked everything once again, and its working.

Im really sorry that I caused you so much work and wasted your time...

mostly my imperfections!!

Thanks, I learned a lot because of you! smiley.gif
 

somus1735

Member
May 25, 2018
833
0
16
LOL...that was a journey smiley.gif

I tried making different htpasswd files, when it didnt work, so I changer the user in the conf file, and didnt change it back,...

So I took your advice and checked everything once again, and its working.

Im really sorry that I caused you so much work and wasted your time...

mostly my imperfections!!

Thanks, I learned a lot because of you! smiley.gif
it's totally ok.
i'm glad i could help
 

shwetha17

Member
May 24, 2018
785
0
16
smiley.gif

Hello I use lighttpd on one of my servers and in my lighttpd.conf I use mod-auth, and my settings are as follows:

Code:
###mod auth##########
auth.debug = 2
auth.backend = "plain"
auth.backend.plain.userfile = "/home/lighttpd/.lighttpdpassword"


auth.require = ( "/rutorrent/" =>
(
"method" => "basic",
"realm" => "Password protected area",
"require" => "user=xxxxxxxxx"
)
)
Where you have setup htpasswd I have lighttdpassword, but it doesnt really matter wha tyou call the passwd file providing you make a reference to the passwd file in your lighttpd.conf. Its recommended you keep that file separate from your rutorrent folder.

I am assuming from your posts you have all your ssl appropriately setup.

Hope this helps