Find the answer to your Linux question:
Results 1 to 4 of 4
Hey Guys, I got a doubt with the authentication part of linux. The file /etc/passwd and /etc/shadow does not have 'write permission' for users and others section (-rw-r--r--). But still ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2009
    Posts
    6

    Unhappy Doubt with passwd exe!!!


    Hey Guys,
    I got a doubt with the authentication part of linux. The file /etc/passwd and /etc/shadow does not have 'write permission' for users and others section (-rw-r--r--). But still when a user (not root) changes his password using the command 'passwd', it edits the /etc/passwd and /etc/shadow files.
    I think its the passwd binary which is the culprit but am not able to view the binary exe file to understand the passwd program.
    Please let me know if any one knows the soln or if there is a way to open the passwd exe.

  2. #2
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,132
    Don't worry about it, the user isn't directly changing the passwd or shadow files themselves. The passwd command speaks to pamd (pluggable authentication module daemon) which makes the changes on the user's behalf. All authentication is handle by PAM through pamd.

  3. #3
    Just Joined!
    Join Date
    Aug 2009
    Posts
    6
    hey thanks for the quick reply....so is it the pam_unix.so (in system-auth.....password module type)which writes to these files?. I was just curious to know how it functions exactly.
    Is there any way to open the passwd exe?

  4. #4
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,132
    Sorry for the late reply, you can get the source I'm sure, it's part of the GNU project as far as I'm aware. I think you're right on the pam_unix.so too, though there are other libraries that plug into pamd too.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •