LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 05-21-2004, 05:43 AM   #1
Thomas23
LQ Newbie
 
Registered: May 2004
Posts: 4

Rep: Reputation: 0
authentication user by /etc/shadow


the etc/shadow - file contains user-info,
including the encrypted password.

I would like to make a website with authentication
with these useraccounts.

Doing this, the user has to write his username and password,
and a script has to compare these with the existing username
and encrypted password in the shadow-file.

Can anybody tell me how i can encrypt the written password
in the same way as it has been done before it was saved in the
shadow file?

Thanks,
Thomas
 
Old 05-21-2004, 09:32 PM   #2
Capt_Caveman
Senior Member
 
Registered: Mar 2003
Distribution: Fedora
Posts: 3,658

Rep: Reputation: 69
Have you tried using Apache's htaccess + htpasswd? To my knowledge htpasswd can do md5sum and crypt() password encryption.

http://httpd.apache.org/docs-2.0/howto/htaccess.html
http://httpd.apache.org/docs/programs/htpasswd.html
 
Old 05-22-2004, 10:52 AM   #3
BoldKiller
Member
 
Registered: Apr 2002
Location: Montreal, Quebec
Distribution: Debian, Gentoo, RedHat
Posts: 142

Rep: Reputation: 15
There is also an other solution. Debian has a nice Apache module called auth_shadow (or similar). It allows to use directly the /etc/shadow file for user authentication.

It seems to work fine. But, for security reason, you would need to use SSL to transmit the password. This is quite easy to do.

Hope this helps,
 
  


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
Root Password Broken - authentication not catching /etc/shadow changes greennick Debian 18 09-23-2005 04:30 AM
PHP Authentication against /etc/shadow mpgram Programming 1 04-13-2004 11:55 PM
User Migration: how do you move /etc/shadow? groovin Linux - General 4 04-13-2004 11:26 AM
passwd / shadow issues -- Authentication failed BartonOC Linux - General 2 02-12-2004 08:50 PM
/etc/shadow in user authentication katana Linux - General 3 06-24-2001 11:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:25 PM.

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