On Sat, Jun 06, 2020 at 04:02:12PM -0500, Bruce Dubbs via lfs-dev wrote: > On 6/6/20 2:05 PM, Ken Moffat via lfs-dev wrote: > > I can see that the tester user gets added by a command which uses > > ls -n $(tty) > > and I now see that this results for me in a value of 1000. > > > > What I don't understand is where that comes from. On my systems > > user 1000 happens to be the most important regular user (i.e. me) > > and (after trying a build without noticing this would duplicate the > > UID - I already set up my regular users on the way into chroot) I > > eventually discovered that coreutils was trying to chown to ken. > > > > So, before I try to use a number of my own choosing: is it important > > to match $(tty) ? I can see that /dev/tty1 where I'm logged in has > > an id of 1000, as do the /dev/pts for the terms I'm using. > > It is important for some tests. Look at the permissions for > > $ ls -l /dev/pts > total 0 > crw--w---- 1 1000 tty 136, 0 Jun 6 15:51 0 > crw--w---- 1 1000 tty 136, 1 Jun 4 05:17 1 > > If the owner id doesn't match, then you can't read from the device. >
OK, thanks for that. I've attempted to adapt my script to create my normal user after chapter 6. Emphasis on 'attempted' because a lot of the changes I made in my scripts this week were botched. > > From memory, the book starts at user 1001 (some new-fangled change a > > few years ago, too awkward to change all my files) - but would that > > not mean that if I logged in as user 1001, ran startx (via elogind), > > su, su lfs, the value would be 1001 in that case, and therefore I > > would not be able to upload my user to /etc/passwd until LFS had > > been completed ? > > In the creating files section we have > users:x:999: > > And in shadow > sed -i 's/1000/999/' etc/useradd > > That sed makes /etc/default/useradd have 'GROUP=999'. The combination makes > the first user created by useradd have uid and gid values of 1000 instead of > the default 1001. Of course if 1000 is already in use, it uses the next > numerical value not already used. > Thanks, I must have mis-remembered that. > > I'm increasingly starting to think that I'm not cut out for this. > > Sure you are. We are all continuously learning new things. > > -- Bruce > Well, again thanks, but I'm not at all certain. For example, the host system is the one where after its first boot I managed to run the 'check' tests without failures. Now (normal desktop installed, but same kernel) the tests which raise sigfpe again fail. ĸen -- +++ OUT OF CHEESE ERROR. REDO FROM START +++ -- http://lists.linuxfromscratch.org/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page