PAM errors with NANOBSD

Sean Bruno sbruno at miralink.com
Tue Aug 26 23:31:58 UTC 2008


Sean Bruno wrote:
> Sean Bruno wrote:
>> Sean Bruno wrote:
>>> Sean Bruno wrote:
>>>> I seem to be stumped by my latest issue with NANOBSD.
>>>> I can't login to the console due to missing pam libs and such.  Any 
>>>> and all calls to sudo seem to be blowing up as well.  I can only 
>>>> assume that something from my build system is causing pam to be 
>>>> configured.  Even though I have explicitly set NO_PAM=YES in my 
>>>> NANOConf, I seem to be jamming up on pam.  If I remove the NO_PAM 
>>>> entry, I get the same failure.  So perhaps NO_PAM doesn't mean what 
>>>> I think it means?
>>>>
>>>> Anyone have a clue what the heck is going on here?
>>>>
>>>> ------------------------------------------------------------------------ 
>>>>
>>> Here's an example from my last build.  The system seems to boot 
>>> fine, but then is completely useless at startup:
>>>
>>> FreeBSD/i386 (Amnesiac) (ttyd0)
>>>
>>> login: root
>>> Aug 21 07:50:22  login: in openpam_load_module(): no pam_unix.so found
>>> Aug 21 07:50:22  login: pam_start(): system error
>>>
>>> FreeBSD/i386 (Amnesiac) (ttyd0)
>>>
>>> login:
>>>
>>>
>> adding or removing "NO_PAM=YES" from the NANOBSD configuration has no 
>> impact on whether or not PAM get's built.  So, I'm not sure what the 
>> heck is going on now.
>>
>> I mounted the diskimage on my system and verified that 
>> /usr/lib/pam_unix.so exists and is properly built.  Any ideas as to 
>> why my disk image is acting like this?
>>
> Ok, this is excruciating.  I can only assume that I am doing something 
> so completely wrong that it is befuddling the build system and it's 
> not generating an error that would be meaningful.
>
> I am using a RELENG_6 build machine to build a RELENG_6 image and I 
> can't seem to figure out what is generating this non-sense PAM error.  
> I'm certain that the correct libs are in place and that everything is 
> being built without errors.
>
> Is anyone else using RELENG_6 with NanoBSD right now?  This worked 
> pre-6.3 and I can't see anything that would be causing this type of 
> absolute failure.
>
Well, after twiddling about I began removing "NO_" argument from my 
configuration file.

When I had removed:

NO_TOOLCHAIN=YES
NO_ATM=YES
NO_NIS=YES
NO_SHARE=YES

All started working as it should, i.e. I could login to the console 
again and the PAM errors had vanished.

I have attached my configuration in the event anyone else wants to 
figure out how or why this problem manifested itself.



-- 
Sean Bruno
MiraLink Corporation
6015 NE 80th Ave, Ste 100
Portland, OR 97218
Phone 503-621-5143
Fax 503-621-5199
MSN: sbruno at miralink.com
Google:  seanwbruno at gmail.com
Yahoo:  sean_bruno at yahoo.com

-------------- next part --------------
NANO_NAME=miralink
NANO_SRC=${PWD}/../../../
NANO_OBJ=${PWD}/build
NANO_KERNEL=GENERIC
NANO_IMAGES=2
NANO_DRIVE=ad0

CONF_BUILD='
NO_NETGRAPH=YES
NO_PAM=YES
'

CONF_INSTALL='
NO_BLUETOOTH=YES
NO_CVS=YES
NO_FORTRAN=YES
NO_HTML=YES
NO_LPR=YES
NO_MAN=YES
NO_SHAREDOCS=YES
NO_EXAMPLES=YES
NO_CALENDAR=YES
NO_MISC=YES
NO_SENDMAIL=YES
NO_INFO=YES
'

CONF_WORLD='
NO_BIND=YES
NO_KERBEROS=YES
NO_GAMES=YES
NO_RESCUE=YES
'

# This removes the standard BSD menu from system startup.
cust_nobeastie() (
    touch ${NANO_WORLDDIR}/boot/loader.conf
    echo "beastie_disable=\"YES\"" >> ${NANO_WORLDDIR}/boot/loader.conf
)

PORT_PACKAGES="sudo-1.6.8.12_1 perl-5.8.8 net-snmp-5.2.3_3 smartmontools-5.36 lsof-4.77 openssl-0.9.8d p5-Net-SSLeay-1.30_1"

install_ports() (
	for package in $PORT_PACKAGES; do
		sudo pkg_create -b $package
		PACKAGE_FILE="$package".tbz
		cp $PACKAGE_FILE ${NANO_OBJ}/_.w
		chroot "$NANO_WORLDDIR" sh -c "pkg_add -vF $PACKAGE_FILE; rm -f $PACKAGE_FILE"
	done
)

FlashDevice transcend dom512m

# Serial console only
customize_cmd cust_comconsole
# Root may ssh in
customize_cmd cust_allow_ssh_root
# Install Nanobsd update files in /root
customize_cmd cust_install_files
# Remove the BSD Daemon Menu
customize_cmd cust_nobeastie
# Install PORT_PACKAGES
customize_cmd install_ports


More information about the freebsd-embedded mailing list