1

in linux centos 7

linux using telnet server

What is the name of the file responsible for checking the password, whether it is valid or not?

1
  • No-one should be offering a telnet service in this day and age Commented Aug 26, 2021 at 21:05

2 Answers 2

1

Any privileged (UID=0) program can read /etc/shadow, retrieving both the encrypted password and the encryption algorithm for a given user.

The program uses the encryption algorithm to encrypt the password-to-be-tested. If the two encrypted passwords match, so do the two passwords, if they don't match, the passwords don't either, and no information about the actual password is leaked.

5
  • I am asking about the name of the file in which the password check code is contained. Commented Aug 26, 2021 at 4:04
  • What I want to do is modify this code Commented Aug 26, 2021 at 4:08
  • @mohammedmoha if that's for an exploit, fair enough. If it's for a production system then it's almost certainly the wrong approach Commented Aug 26, 2021 at 21:04
  • @mohammed-moha I explained in my answer. There is not ONE place passwords are checked. Commented Aug 26, 2021 at 21:56
  • Passwords are checked, as I explained above, in several programs. Offhand, there's login, the PAM infrastructure, sudo and sudo-like, and any other program that wants to. Why do you want to change the password authentication for the whole system? What change to you want to make? Commented Aug 27, 2021 at 1:13
0

It all goes through the pam infrastructure.

3
  • give me file path Commented Aug 26, 2021 at 21:52
  • 'man pam' will give you a start. It's not one file, it's a series of them. Both config & shared libs. Commented Aug 26, 2021 at 21:53
  • Please note that brevity is acceptable, but fuller explanations are better ;) Commented Aug 27, 2021 at 7:14

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.