LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 11-16-2005, 09:19 AM   #1
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Rep: Reputation: 47
verifying a login w/ /etc/shadow


I am writing a web-interface program that needs users to logon. I want any user on the system to be able to log on if they are a member of a specific group. What I need to know is how the passwords are encrypted into /etc/shadow. I thought it was md5, but trying 'echo "thepassword" | md5sum' did not return the same encrypted form as the one I see in /etc/shadow.

MY question: what program do I pass the plaintext form of the password to to obtain the encrypted form I would use to compare w/ the one in /etc/shadow for logins.
 
Old 11-17-2005, 08:12 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,417
Blog Entries: 55

Rep: Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628Reputation: 3628
Your question should be: "I understand I should not try and invent the wheel again, especially since tried and tested methods exist. So please explain how I can use the standard Linux authentication framework (PAM) to it's full advantage."

//Moderator note: this thread should go to /Programming, since it's a coding issue, not a security issue.
 
Old 11-17-2005, 08:39 AM   #3
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Original Poster
Rep: Reputation: 47
ok, so do I move the thread or do you? and also I am not looking for a way to code it, I am looking for a command I can run...
 
Old 11-17-2005, 09:21 AM   #4
Krugger
Member
 
Registered: Oct 2004
Posts: 229

Rep: Reputation: 30
check if you have a checkpassword command, if you don't. Check http://checkpasswd-pam.sourceforge.net/ for an improved version of it.
 
Old 11-17-2005, 01:20 PM   #5
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Arch
Posts: 1,374

Original Poster
Rep: Reputation: 47
ok, I installed check-password not check-password-pam, I am not using pam. I run checkpassword and it just exits... I try --help and it just exits, I type man checkpassword and it says no entry... how do I use it?
 
  


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
Login Process & Security of /etc/passwd and /etc/shadow arut Solaris / OpenSolaris 3 12-27-2004 01:13 PM
Verifying CD's Caysho Linux - General 1 12-24-2004 08:14 PM
/etc/shadow- (notice the dash after the word shadow) shellcode Linux - Security 1 09-03-2004 04:54 AM
Verifying installation of glib? jake3217 Linux - Software 3 08-16-2004 01:13 PM
verifying if running 64bit OS syx Linux - Software 0 11-27-2003 10:44 PM

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

All times are GMT -5. The time now is 07:46 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