LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 05-04-2013, 03:41 PM   #1
ulkoma
Member
 
Registered: Feb 2012
Distribution: CentOS
Posts: 69

Rep: Reputation: Disabled
What is the name of the program that encrypts users passwords during login process


and compares them to the hashes in /etc/passwd or /etc/shadow?
 
Old 05-04-2013, 04:48 PM   #2
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
This may help I suppose.
 
Old 05-04-2013, 04:51 PM   #3
ulkoma
Member
 
Registered: Feb 2012
Distribution: CentOS
Posts: 69

Original Poster
Rep: Reputation: Disabled
hmmm, when I enter my user name then my password then press enter which program/piece of software takes the password I entered then encrypts it into a hash then compares it?
 
Old 05-04-2013, 05:01 PM   #4
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
“agetty” is the login manager, at least in Arch until systemd. I have “agetty” if I look in inittab on my system, which still functions without systemd. “agetty” can use glibc functions to make hash of the password you entered and then compare. But this is just a conjecture.

Last edited by Mr. Alex; 05-04-2013 at 05:04 PM.
 
Old 05-04-2013, 07:07 PM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 3,440

Rep: Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508Reputation: 1508
With PAM (Pluggable Authentication Modules), pretty much anything could be used. You would need to look at /etc/pam.d/system-auth and see what programs are invoked (e.g., pam_unix.so) and read their manpages to see how the password is checked.
 
Old 05-04-2013, 10:31 PM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,697

Rep: Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261
Quote:
Originally Posted by Mr. Alex View Post
“agetty” is the login manager, at least in Arch until systemd. I have “agetty” if I look in inittab on my system, which still functions without systemd. “agetty” can use glibc functions to make hash of the password you entered and then compare. But this is just a conjecture.
No - agetty just initializes the terminal with the appropriate baud rate, bit rate, modem control... then it execs login (I believe it is a "login -p"), it is also possible that the username is read by agetty, and then execs "login <username>" to handle the password.

But it is login that reads the password, invokes a PAM module to hash it, then it proceeds to validate the user (home directory handling, proper shell - which may actually be tested first, security flags...), and then after validation, login execs the users shell.

If the user is not validated, then login exits... and the init process restarts the agetty to reset and reinitialize the terminal (this is partly to prevent any carry over data from a login, but mostly just to ensure the terminal is working properly).
 
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
[SOLVED] Program for Squid to allow users change passwords. linuxlover.chaitanya Linux - Server 3 01-11-2011 01:03 AM
Network Login - mirroring users/passwords Kahless Linux - Software 2 07-13-2005 05:13 AM
Making users change passwords on first login linuxpyro Linux - Security 1 12-24-2004 01:28 PM
separate login IDs/passwords for email and users zthomasz Linux - Security 3 08-01-2003 11:35 AM
separate login IDs/passwords for email and users zthomasz Linux - Newbie 3 07-29-2003 01:19 PM


All times are GMT -5. The time now is 08:41 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration