Re: BLFS, After pam and systemd

Pocket ([email protected] via blfs-support Mailing List) <[email protected]>
Newsgroups gmane.linux.lfs.beyond.support
Message-ID <[email protected]>

On 8/20/26 03:10, Pierre Labastie ([email protected] via 
blfs-support Mailing List) wrote:
> On Thu, 2026-08-20 at 01:57 +0000, Richard wrote:
>> Been there, done that...
>>
>> In pcap install, you want to back this out:
>>
>> mv -v /etc/pam.d/system-auth{,.bak} &&
>> cat > /etc/pam.d/system-auth << "EOF" &&
>> # Begin /etc/pam.d/system-auth
>>
>> auth      optional    pam_cap.so
>> EOF
>> tail -n +3 /etc/pam.d/system-auth.bak >> /etc/pam.d/system-auth
> 
> I do have the modified system-auth, and it works for me...
> 
> I cannot reproduce ATM. What I have done differently is that I have
> built cracklib and libpwquality before shadow (cracklib even before
> pam), and libcap-pam after systemd. I use jhalfs, so that instructions
> should be the same as the ones obtained with "dump-commands".
> 
> I'll try to reproduce exactly what you have done, but this may take
> some time because I need to set up a new VM for this...
> 
> Pierre
> 
> 

I fixed my issue with some help from the Arch linux folks.  The 
/etc/pam.d/system-auth file was missing auth optional pam_cap.so. It was 
removed by the way the book added auth optional pam_cap.so.

The script in the book adds: auth optional pam_cap.so in a most 
cantankerous way. If the line you need isn't precisely in the right 
place in the file is fails leaving you with a system that doesn't 
require or prompt you for a password.

The book:
tail -n +3 /etc/pam.d/system-auth.bak >> /etc/pam.d/system-auth

This is better in my opinion and should always work:

sed -e '/pam_unix.so/i auth optional pam_cap.so ' -i .bak 
/etc/pam.d/system-auth


I think the way the book did it, is a bit of Dubbsism ;)


-- 
Hindi madali ang maging ako

-- 
http://lists.linuxfromscratch.org/sympa/info/blfs-support
Unsubscribe: See the above information page
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.