[lfs-support] Getting <su> in Chapter 5
bruce.dubbs at gmail.com
Mon Oct 7 18:33:35 PDT 2013
Ken Moffat wrote:
> On Mon, Oct 07, 2013 at 11:59:00PM +0100, Ken Moffat wrote:
>> The usual way to look at what gets installed is to run 'make
>> DESTDIR=/path/to/somewhere install [ optional args ]' - once you get
>> into DESTDIR installs for looking at what is installed you will find
>> some packages use other variables (often INSTALLROOT or something
>> like that) - if shadow is such a package,then running *as a user*
>> will fail. So try it as a user, to a directory which that user can
>> write to.
> OK, so you can't try a DESTDIR install as a normal user because you
> are root and 'su' doesn't exist. Build outside the new system as
> user lfs and do a DESTDIR, e.g. to /home/lfs/somewhere or
> /tmp/somewhere. The same for su from old coreutils (my notes show
> that I had to build all of coreutils to get su linked - there might
> be a shorter series of commands - but NOT which old version of
> coreutils last contained 'su'.
If the only thing needed is su, then I'd build shadow with:
./configure && make && cp src/su /tools/bin
It doesn't need to be suid since it's run by root.
More information about the lfs-support