'su lfs' dropping into the background

Alex Groenewoud alex at linuxfromscratch.org
Mon Jan 19 13:33:31 PST 2004


It's an interesting experience, doing things exactly by the book for a 
change.  Look what happens when user lfs is added on my system:

root:~# useradd -s /bin/bash -m lfs
root:~# su - lfs
lfs at sunce:~ >

Looks okay so far.  But now this:

lfs at sunce:~ > ls -a
.              .dayplan.priv  .kermrc     .tex            .xfm
..             .dvipsrc       .lyxrc      .uitrc.console  .xinitrc
.Xdefaults     .emacs         .muttrc     .uitrc.vt100    .xserverrc.secure
.Xmodmap       .exrc          .nc_keys    .uitrc.vt102    .xsession
.Xresources    .gimprc        .profile    .uitrc.xterm    .xtalkrc
.bash_history  .grok          .seyon      .urlview        .zsh
.bashrc        .hotjava       .stonxrc    .vimrc
.dayplan       .jazz          .susephone  .xcoralrc

What a mess.  The -m flag to useradd doesn't just create the /home/lfs
directory, but also populates it with all the files from /etc/skel.  I
don't like the idea of having to create /home/lfs and chown it by hand,
but if we want to have a really clean environment we will have to do 
either that or tell the reader to do a rm -r /home/lfs/{*,.*}.  Or 
should we just ignore all those dot files, even the .profile and 
.bashrc?

Now something else, when I exit from user lfs and re-enter, this 
happens:

lfs at sunce:~ > exit
logout
root:~# su - lfs
 
[1]+  Stopped                 su - lfs
root:~#

A foreground command is needed to get to the lfs user's shell:

root:~# fg
su - lfs
lfs:~$

Is this normal?  And if so, I don't like it.  Should the book really be 
telling the reader to set up a .bash_profile that makes it act like 
this?  Of course normally the reader doesn't exit from lfs, so this will 
hardly ever be noticed, but still.

Alex




More information about the lfs-dev mailing list