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://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.

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.

   -- Bruce


   -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to