You are not logged in.

#1 2009-02-11 20:52:11

kmiller8
Member
Registered: 2009-02-11
Posts: 6

Password protected local server

I have created a server for my local network and now i want it to prompt for a username and password when someone trys to access it.

Offline

#2 2009-02-11 20:55:39

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Password protected local server

You need to provide more info than that.

What kind of server? (http/ftp/nfs/etc)
What program are you running? (apache/vsftpd/samba/etc)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2009-02-11 21:14:24

kmiller8
Member
Registered: 2009-02-11
Posts: 6

Re: Password protected local server

http server

Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8j DAV/2

running on Arch of course

I used the "Comprehensive Server Guide" on the wiki to create an Apache server

and I added PHP to the server

Last edited by kmiller8 (2009-02-11 21:16:49)

Offline

#4 2009-02-11 21:42:01

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: Password protected local server

How does the user access it? Do you want tot setup a fileserver or a webserver?

In the first case, you can do it with a simple .htaccess-file (but there are many other options to authenticate through apache-plugins). Google will give you plenty info on that file and how to set it up.
In the second case, you'll have to write/use a webpage that uses the user-input to authenticate with a known source. Gives a little more polish to it all.

And by the way: you could just use both methods at the same time... Your question is very vague I guess :-)

Zl.

Offline

#5 2009-02-11 21:47:18

kmiller8
Member
Registered: 2009-02-11
Posts: 6

Re: Password protected local server

right now I just want to set up a file server with limited acces to only those who have a proper username and password

and I want the users on the file server to have different usernames than the username on the computer

Offline

#6 2009-02-11 22:42:05

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Password protected local server

http://httpd.apache.org/docs/1.3/howto/auth.html
That explains how to set up basic username/password access, which should be good enough over a LAN.

http://httpd.apache.org/docs/1.3/mod/mod_access.html
You can couple that with mod_access to restrict access to specific IPs etc.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#7 2009-02-11 22:51:36

kmiller8
Member
Registered: 2009-02-11
Posts: 6

Re: Password protected local server

thanks, I got it working now

Offline

#8 2009-02-11 23:08:20

kmiller8
Member
Registered: 2009-02-11
Posts: 6

Re: Password protected local server

now i have another question

how can i set access of folders to only one group?

Offline

#9 2009-02-12 08:56:30

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: Password protected local server

Offline

#10 2009-02-12 18:40:47

kmiller8
Member
Registered: 2009-02-11
Posts: 6

Re: Password protected local server

Where do i put the <Directory> code

Offline

#11 2009-02-12 18:53:18

zenlord
Member
From: Belgium
Registered: 2006-05-24
Posts: 1,221
Website

Re: Password protected local server

Please read if a link has been provided:

"These directives may be placed in a .htaccess file in the particular directory being protected, or may go in the main server configuration file, in a <Directory>  section, or other scope container."

Zl.

Offline

Board footer

Powered by FluxBB