Page 1 of 1

User Restricted Area on Website using Linux User Credentials

Posted: 07 Jan 2008, 12:45
by GaryL
Hi all

I would like to have a password protected area on my website using Bubba's user credentials. Can this easily done?

Many Thanks
Gary

Posted: 08 Jan 2008, 01:11
by Eek
Hi

don't get why you would want to couple your bubba user to your website.

to add a private section to your website,
the most easy and practical is to use .htaccess file

http://httpd.apache.org/docs/2.0/howto/auth.html
http://httpd.apache.org/docs/2.0/howto/htaccess.html

or use php & mysql
i use phpfusion to power my website.

cheers
Eek

Posted: 08 Jan 2008, 03:39
by GaryL
hiya

I only use my bubba for personal use, share photos etc with family and friends. So there are only a few users altogether. All whom I trust and have granted have access to web-admin.

But I would also like these users to have access to a password protected area on my website, to share personal photos etc, or even just a few web pages that I don’t want visible to the public.

The main reasons why I would like to use Bubba’s users is simply because these are strictly the users I want to limit access too. And it would also require less work in regards to user set-up and maintenance; from my eyes it would just be a lot easier and maintainable.

Posted: 08 Jan 2008, 04:31
by Eek
Hi

You mean they all login using the admin user?
if so, you could create new users and they could use that account to login to the web-admin.

But i would recommend you to use a different method.
For instance use a wiki site or a portal site.
That is much nicer, easier and more secure.
And it is very easy to set-up and maintain.

You can for example test-drive php-fusion:
http://www.opensourcecms.com/index.php? ... iew&id=464

cheers
Eek

PS. I also have the web-site just for friends and family

Posted: 08 Jan 2008, 05:21
by JohanJ
so if i download PHP-Fusion 6.01.13

What must i do with it ?
do i have to install more than that to make it to work ?
is it only to put it in web directory ?
sorry for all stupid questions but im new to linux.

Posted: 08 Jan 2008, 05:24
by GaryL
No, they all have their own user accounts to access bubba's web-admin.
I just want the exact same users to have access to a protected area of my website using the same user credentials as they have to access bubba's web-admin.

It would be a simpler and lighter solution than using a CMS. And users will only need to be set-up the once. Besides what i plan will be pretty basic, no need for a CMS of any sort.

Basically I want to set up a directory called user-area that will be like so mywebsite.com/user-area/ that when you navigate to, it'll present you with a login screen, similar to that of the web-admin. Where all my bubba users can sign in and access this protected area.

Posted: 08 Jan 2008, 05:43
by Eek
Got it.

I think you can just reuse the php code of the bubba's web-admin page and use it to create your own user-area site.

Or create the user-area directory in your html directory and put a .htaccess file for authentication in it.
so if i download PHP-Fusion 6.01.13
What must i do with it ?
I will create a how-to ... soon ... :)

Posted: 08 Jan 2008, 17:19
by tor
HI GaryL,

I think you should look into the package libapache2-mod-auth-pam and htaccess. http://pam.sourceforge.net/mod_auth_pam/ Or possibly php4-auth-pam to avoid the ugly basic authentication popup.

/Tor

Posted: 09 Jan 2008, 07:58
by GaryL
thanks guys

i know very little when i comes to php, so libapache2-mod-auth-pam seems to be the easiest for me.

heres a few links i found:

http://www.linux.com/base/ldp/howto/Use ... /x316.html
http://muyiwataiwo.com/main/book_page/c ... entication

shall have a crack at it tonight