Adding radius client with PAM

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Adding radius client with PAM

145 Views
Iribe18
Contributor II

Hello, 

How can I add pam_radius_auth module with  Yocto rocko ?

In my local.conf I added:

DISTRO_FEATURES_append = " pam"

IMAGE_INSTALL += " \

   freeradius \

   freeradius-utils \

   cracklib \

   pam-plugin-cracklib \

"

But I still can't find a recipe to add pam_radius_auth.so in my image.

Thanks for your help.

 

Labels (1)
Tags (2)
0 Kudos
2 Replies

51 Views
Iribe18
Contributor II

Thanks @Chavira

 

Solution:

To add pam_radius_auth.so to the image follow these steps:

In you custom layer add the recipe recipes-security/pam-radius-auth.bb

 

# meta-custom/recipes-security/pam-radius-auth/pam-radius-auth.bb

DESCRIPTION = "PAM RADIUS authentication module"
HOMEPAGE = "https://github.com/FreeRADIUS/pam_radius"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"

SRC_URI = "https://github.com/FreeRADIUS/pam_radius/archive/refs/tags/release_2_0_0.tar.gz"

SRC_URI[sha256sum] = "798dc358e7a143163e103bd38c4101645b2e93d82aa0ec63d32c0cb929d9c65c"

S = "${WORKDIR}/pam_radius-release_2_0_0"

# Specify any dependencies required for building
DEPENDS = "libpam openssl"

do_configure() {
    if [ -e ${S}/autogen.sh ]; then
        ${S}/autogen.sh
    fi
    if [ ! -e ${S}/configure ]; then
        autoreconf -vif
    fi
    ${S}/configure --prefix=${prefix} --host=x86
}

do_compile() {
    oe_runmake
}

do_install() {
    install -d ${D}${base_libdir}/security
    install -m 0755 pam_radius_auth.so ${D}${base_libdir}/security/
}


FILES_${PN} = "${base_libdir}/security/pam_radius_auth.so"

 

Add the recipe to your image  in conf/local.conf.

IMAGE_INSTALL:append = " pam-radius-auth"

This will add pam_radius_auth.so in:

/lib/security/pam_radius_auth.so

 

0 Kudos