Question

What is the relationship between Linux-PAM and the kernel? Is Linux-PAM part of the kernel?

When I use sudo, tty, is this kind of authentication finished in kernel space?

Was it helpful?

Solution

PAM is entirely in user-space. It's a set of libraries that are used by programs that need to verify credentials.

For example, ldd /usr/bin/sudo on my machine shows

    linux-vdso.so.1 =>  (0x00007fff30fff000)
    libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f5923fd4000)
    libpam.so.0 => /lib/x86_64-linux-gnu/libpam.so.0 (0x00007f5923dc7000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5923bc2000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f592382d000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f59241fd000)

The binary using the PAM libraries will need to run as root (the library code may need to access /etc/shadow, for example).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top