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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-08-2009, 12:02 PM
|
#1
|
LQ Newbie
Registered: Nov 2009
Posts: 13
Rep:
|
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.
|
|
|
12-08-2009, 12:05 PM
|
#2
|
Member
Registered: Jan 2009
Location: wherever I can make a living
Distribution: OpenBSD / Debian / Ubuntu / Win7 / OpenVMS
Posts: 440
Rep:
|
Quote:
Originally Posted by Cracker-Barrel
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.
|
|
|
12-08-2009, 12:16 PM
|
#3
|
LQ Newbie
Registered: Nov 2009
Posts: 13
Original Poster
Rep:
|
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.
|
|
|
12-08-2009, 12:28 PM
|
#4
|
Member
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Rep:
|
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.
|
|
|
12-08-2009, 12:57 PM
|
#5
|
LQ Newbie
Registered: Nov 2009
Posts: 13
Original Poster
Rep:
|
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.
|
|
|
12-08-2009, 01:36 PM
|
#6
|
Member
Registered: Jan 2009
Location: wherever I can make a living
Distribution: OpenBSD / Debian / Ubuntu / Win7 / OpenVMS
Posts: 440
Rep:
|
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.
|
|
|
12-08-2009, 01:56 PM
|
#7
|
Member
Registered: Nov 2009
Location: Alabama
Distribution: EndeavourOS
Posts: 650
Rep:
|
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.
|
|
|
12-08-2009, 04:53 PM
|
#8
|
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,434
|
Have you looked at .htaccess & .htpasswd ?
|
|
|
12-11-2009, 04:08 PM
|
#9
|
LQ Newbie
Registered: Nov 2009
Posts: 13
Original Poster
Rep:
|
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.
|
|
|
12-11-2009, 11:03 PM
|
#10
|
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,797
|
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.
|
All times are GMT -5. The time now is 11:49 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|