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.
Hi @Iribe18!
Please check the documentation above:
Freescale Yocto Project main page
BSP porting guide: from a I.mx6q reference Board to a Custom board (in Yocto project)
Task #10 - How to create a custom layer
https://wiki.yoctoproject.org/wiki/PAM_Integration
Best Regards!
Chavira
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