[lfs-support] Getting <su> in Chapter 5 [SOLVED][RESURRECTED]
bruce.dubbs at gmail.com
Sun Oct 13 21:02:39 PDT 2013
Drew Ames wrote:
> On 10/13/2013 06:48 PM, Dan McGhee wrote:
>> I got to chroot and the copied su from shadow in Ch 5 didn't work. I
>> can find no reason that it didn't. What I want to do now is compile it
>> in chroot environment and install only it there. Just in case I missed
>> some kind of linking. That seems unlikely, but.... ldd /tools/bin/su
>> (on the copied version) provided:
>>> linux-vdso.so.1 (0x00007ffff9b38000)
>>> libcrypt.so.1 => /tools/lib/libcrypt.so.1 (0x00007f20fb668000)
>>> libc.so.6 => /tools/lib/libc.so.6 (0x00007f20fb2b8000)
>>> /tools/lib64/ld-linux-x86-64.so.2 (0x00007f20fb8a0000)
>> as did ldd on my DESTDIR install, so it looks like everything is there.
>> The two lines from the install log that I need are
>> libtool: install: /usr/bin/install -c su /home/dan/LFS-7.4/shadow/bin/su
>> chmod -f 4755 /home/dan/LFS-7.4/shadow/bin/su;
>> So after I compile I need either
>> make install -c -m 0755 src/su /tools/bin
>> install -c -m 0755 src/su /tools/bin
>> Which of the two commands will give me the necessary linking I need?
>> Does it make a difference? Is the sytax correct. I apologize for being
>> such a make and install dummy. It's just one of those things that I
>> haven't gotten. BTW, I neither need nor want mode 4755 for the chroot
> Dan, Bruce, and Ken,
> I've been following this thread with interest. I'm into my fourth LFS
> build, using LFS 7.4.
> For my previous three builds, I successfully use the package user hint
> without any problems. Now I'm facing the same issues as Dan.
> I tried building su from an old source at this link, starting at line 802:
> I built it with GCC at the end of chapter 5 (I typed 'gcc -o su su.c'),
> then copied it to /tools/bin.
> When I got to chapter 6, as the root user in the chroot environment,
> that copy of su would not switch users to the linux-libc-headers user I
> created for the first package. I got the error:
> bash: /tools/bin/su: No such file or directory
> I then copied su from the host system and got the same results.
> Dan, when you say that su didn't work for you. Did you get an error message?
I don't know, but I wonder if the problem is the lack of passwd, group,
shadow, etc files. You need to track the source to find out. Just add
printf statements at strategic places.
More information about the lfs-support