LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-08-2009, 12:02 PM   #1
Cracker-Barrel
LQ Newbie
 
Registered: Nov 2009
Posts: 13

Rep: Reputation: 0
Question Website login authentication - expert advice needed


Hello,

I am currently developing a webpage to login remotely so that I can configure applications on a linux platform. Web development is new to me.....so I have been searching the net to get the best solution. Currently I am heading towards "digest authentication" for my first stab at this.

Currently I have a debain running the lighttpd web server. I do NOT want to use a database to store username/password. I am using php as my server script and js as my client script. The equipement that is required to be logged onto will be limited to a handful of users.

Essentailly I just want to know if I am on the right track or if I should be looking at something else. If it is "something else" please kick me in the right direction.


Thank you.
 
Old 12-08-2009, 12:05 PM   #2
MBybee
Member
 
Registered: Jan 2009
Location: wherever I can make a living
Distribution: OpenBSD / Debian / Ubuntu / Win7 / OpenVMS
Posts: 440

Rep: Reputation: 57
Quote:
Originally Posted by Cracker-Barrel View Post
Hello,

I am currently developing a webpage to login remotely so that I can configure applications on a linux platform. Web development is new to me.....so I have been searching the net to get the best solution. Currently I am heading towards "digest authentication" for my first stab at this.

Currently I have a debain running the lighttpd web server. I do NOT want to use a database to store username/password. I am using php as my server script and js as my client script. The equipement that is required to be logged onto will be limited to a handful of users.

Essentailly I just want to know if I am on the right track or if I should be looking at something else. If it is "something else" please kick me in the right direction.


Thank you.
If you don't want to use a database of some sort to store users, what are you planning to use? If the number is extremely tiny, I suppose you could hard code it in the PHP itself. The down side is that any hardcoded passwords would be accessible if they are stored in the javascript (and possibly even in the PHP, depending on server misconfigs).

Depending on what you're providing access to, there may be an existing web utility you could use.
 
Old 12-08-2009, 12:16 PM   #3
Cracker-Barrel
LQ Newbie
 
Registered: Nov 2009
Posts: 13

Original Poster
Rep: Reputation: 0
MByBee

My understanding with digest authentication is that you can use htdigest utility provided to create a file of users and and hashed passwords. This is stored in a file that is configured in the lighttpd web server. Digest authentication only transfers a hashed value over the network and the authentication is established by issueign a challenge and validating the challenge response.
 
Old 12-08-2009, 12:28 PM   #4
Web31337
Member
 
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
Quote:
so that I can configure applications on a linux platform
meaning you want to run webserver under root? don't.
btw if you want "digest" authentication look into your webserver.
digest HTTP authentication also requires browser that knows how to do that. not all can.

Last edited by Web31337; 12-08-2009 at 12:30 PM.
 
Old 12-08-2009, 12:57 PM   #5
Cracker-Barrel
LQ Newbie
 
Registered: Nov 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Ok, what if I dont' what to use "digest authentication".
I was doing some reading and it looks like you cannot log off, nor can you make a cutomized login page ( at least this is what the article said).

What would you suggest. What about kerebos?

All I want is to login to the machine via a web page( utilizing my web login page),
set some configurations. It security and eventually licensing.
 
Old 12-08-2009, 01:36 PM   #6
MBybee
Member
 
Registered: Jan 2009
Location: wherever I can make a living
Distribution: OpenBSD / Debian / Ubuntu / Win7 / OpenVMS
Posts: 440

Rep: Reputation: 57
Well, it sounds like you want some kind of remote admin toolkit for your box that requires the absolute minimum configuration, right?

If I were to do something like this, probably the safest way is with a simple CGI. You can maintain the authentication inside the CGI and not make it world-viewable (just have it direct to the proper page). The page could just call scripts to do the tasks you need done - though I strongly urge you to consider getting something pre-built.

I suspect you want a toolkit like this, though: http://www.linux.com/archive/feature/141943
You may also want to look up other admin consoles, depending on what you do.
 
Old 12-08-2009, 01:56 PM   #7
bret381
Member
 
Registered: Nov 2009
Location: Alabama
Distribution: EndeavourOS
Posts: 650

Rep: Reputation: 79
If you are wanting to do remote administration, even for a webserver, you should probably get something prebuilt if web development is new to you. You sure don't want someone getting in your box and screwing everything up. Great security is a must on a web server, or any server for that matter. If you are wanting to do remote admin, you may look into webmin. I think that you can use it remotely, but I am not 100% sure. I know you can administer samba, apache, proftp, bind, postfix, sendmail and many others. just a suggestion.
 
Old 12-08-2009, 04:53 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,434

Rep: Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790Reputation: 2790
Have you looked at .htaccess & .htpasswd ?
 
Old 12-11-2009, 04:08 PM   #9
Cracker-Barrel
LQ Newbie
 
Registered: Nov 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Update.

So first off I have abandoned the idea of digest authetication. First off you cannot get a personalized web login page and secondly the line is not encrypted and exposes some potential critical information.

Therefore I have impelmented ssl on my web server and currently have created a self signed certificate. I am hoping that this is enough for security. ( If not someone can comment !!! )

Because I am working on an embedded system I need to keep installation to a minimum, as my resources are very limited.

Ideally, I would like to shut down ssh ( for security reasons ) and just have a user log in via the web page which will essentially be the only window for a maintanence person into the system. ( well except root will be able to ssh in)

I am still looking for a solution to do a login page without having to install a database, but I have discovered that sqlite has a small footprint and may resort to this method.

Is there no way to have a php on the server side accesss the login info typically required during an ssh sessions? I am going to investigate. This way I would have the users/passwords already setup and would NOT have to create a database to basically shawdow what already exists???

Thanks for everybodies help.
 
Old 12-11-2009, 11:03 PM   #10
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,797

Rep: Reputation: 282Reputation: 282Reputation: 282
Your own certificate will be sufficient to encrypt the communication. Further you can use a very simple html page with a POST form for login. Once the user submits the credentials, that same page or another page can validate the data against credentials stored in a file; as said, this will work well if the number of users is limited.

For dedicated administration, you can consider to write you own webserver (instead of using a general purpose webserver). Check chapter 11 on http://www.advancedlinuxprogramming.com/alp-folder. But this might be outside the scope of your project.

Last edited by Wim Sturkenboom; 12-11-2009 at 11:05 PM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Intel 965GM/X3100 FREEZES w/Java3D - Expert Advice Needed Balarabay1 Linux - Hardware 5 12-02-2008 09:33 AM
UDP port 1900 flooding network? - Expert Advice Needed tbeehler Linux - Software 2 03-18-2007 08:48 PM
moving linux and expert advice needed mrgreaper Linux - Newbie 4 02-06-2007 08:48 AM
Expert advice on future gaming/3d Modeling computer. JesterDev General 4 01-19-2007 09:57 AM
newbie seeks expert advice on special Slackware 10 project kthiessen Slackware - Installation 2 08-30-2004 11:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration