On Sep 4, 2012 4:50 AM, "Bruce Dubbs" <bruce.dubbs <bruce.du...@gmail.com>@<bruce.du...@gmail.com> gmail.com <bruce.du...@gmail.com>> wrote: > > Bryan Kadzban wrote: > > John Burrell wrote: > >> coreutils no longer installs su. > > > > As others said, LFS now uses su from shadow. > > We've installed su from shadow for as long as I recall. It's not new. > > > However, this doesn't help > > you, because there is no chapter-5 shadow installation, and adding its > > dependencies might be problematic. > > > What *may* help you is a return to the package-user hint as it existed > > back before coreutils' version of su accepted UIDs, and also before we > > installed glibc in chapter 5, when the hint had the same issue (because > > usernames could not be resolved to UIDs either, without glibc): > > > > http://<http://wiki.linuxfromscratch.org/hints/browser/trunk/PREVIOUS_FORMAT/more_control_and_pkg_man.txt?rev=904> wiki.linuxfromscratch.org<http://wiki.linuxfromscratch.org/hints/browser/trunk/PREVIOUS_FORMAT/more_control_and_pkg_man.txt?rev=904> /hints/browser/trunk/<http://wiki.linuxfromscratch.org/hints/browser/trunk/PREVIOUS_FORMAT/more_control_and_pkg_man.txt?rev=904> PREVIOUS_FORMAT<http://wiki.linuxfromscratch.org/hints/browser/trunk/PREVIOUS_FORMAT/more_control_and_pkg_man.txt?rev=904> /<http://wiki.linuxfromscratch.org/hints/browser/trunk/PREVIOUS_FORMAT/more_control_and_pkg_man.txt?rev=904> more_control_and_pkg_man.txt<http://wiki.linuxfromscratch.org/hints/browser/trunk/PREVIOUS_FORMAT/more_control_and_pkg_man.txt?rev=904> ?rev=904<http://wiki.linuxfromscratch.org/hints/browser/trunk/PREVIOUS_FORMAT/more_control_and_pkg_man.txt?rev=904> > > > > It used to replace su.c from sh-utils (...yes, sh-utils, before it got > > merged with textutils and one other *-utils package that I don't > > remember, into coreutils) with a custom .c file, in chapter 5. Then it > > built su from that, statically-linked, and installed it without the > > setuid bit. (Because the replacement binary never asked for a password, > > it was totally unsafe to be setuid-root. It was, however, safe for root > > to run this binary targeting a different user.) > > > > That .c file should not require the rest of the sh-utils infrastructure; > > you should be able to build a su binary from those sources directly > > (probably with just "make su" and no Makefile, actually, though I > > haven't tried it). > > I guess I don't understand. When you enter chroot, you are root. Why > do you need su? The only place it's used int he book is in the > cureutils tests and the bash tests. Shadow is now built before either > of these. > They need it to switch from root to the package user, An unprivileged user account with no password so only root can get at it.
> If you really need it for package users, then copy it from the host into > /tools/bin. You are not going to install it, just use it. It has been too long since I last played around with it, but looking at my scripts I ln -sv su-tools /tools/bin/su I honestly don't recall where the su-tools came from. It may have been included in the package users hint's blobs ( more_control_helpers.tar.bz2 )
-- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page