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 ...
- 09-25-2009 #1Just Joined!
- Join Date
- Aug 2009
- Posts
- 6
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.
- 09-25-2009 #2Linux Guru
- Join Date
- Nov 2004
- Posts
- 6,110
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.
- 09-25-2009 #3Just 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?
- 09-30-2009 #4Linux Guru
- Join Date
- Nov 2004
- Posts
- 6,110
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.


Reply With Quote