Le 27/11/2019 à 17:40, Bruce Dubbs a écrit : > Restarting previous thread as a new discussion. > >> On 2019-11-26 14:56 -0600, Douglas R. Reno wrote: >>>> On 2019-11-26 14:39, Bruce Dubbs wrote: > >>>> Also, I am running into an issue I haven't noticed before. On my >>>> existing system if I try to log in as user lfs with .bash_profile >>>> set, >>>> it automatically starts bash and then puts it into the background. >>>> >>>> # su - lfs >>>> [1]+ Stopped su - lfs >>>> # jobs >>>> [1]+ Stopped su - lfs >>>> # fg >>>> su - lfs >>>> lfs:~$ >>>> >>>> The rules in the book work OK as .bash_profile is not present when >>>> we >>>> initially change to user lfs and then we source >>>> .bash_profile. That >>>> works. >>>> >>>> It could have something to do with PAM and su, but I'm not >>>> sure. Has >>>> anyone else seen this? > >>> Yes I have, it's happening on Debian 10 and on LFS now. I'm not sure >>> what's causing it >> >> I've seen this on LFS. Not sure the reason. > > I've investigated this a bit. The problem is in su after pam is installed. I > rebuilt shadow using --without-libpam and copied that to /bin (ensuring it was > suid). The our 'su - lfs' then worked perfectly. > > I did some initial trials to see if changing some of the /etc/pam.d/su > configuration items were causing the problem, but changing /etc/pam.d/su to: > > auth required pam_permit.so > account required pam_permit.so > session required pam_permit.so > password required pam_permit.so > > still causes putting 'su - lfs' in the background. This makes me think the > problem is in su, but it could be something in bash-5.
On debian (where I see this problem on a fresh install, but not on an old (but updated) install), they use su from util-linux. So the problem might not be su. Note that the bash startup files are the same in both debian installations. Pierre -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
