'su lfs' dropping into the background

Bill's LFS Login lfsbill at nospam.dot
Thu Jan 22 06:07:46 PST 2004


On Thu, 22 Jan 2004, Jon Ringle wrote:

> On Thursday 22 January 2004 08:42 am, Bill's LFS Login wrote:
> > On Thu, 22 Jan 2004 Ryan.Oliver at pha.com.au wrote:
> > > Has everyone forgotten the -M option...
> > ><snip>

> > Hmm. My 'man useradd' shows no -M option. But this
> >
> >   useradd -u 666 -g audio -c "Testing user" -d /home/testing -M testing
> >
> > gives no error message. The user is added in /etc/passwd, initial group
> > is set. However, there is no /home/testing directory created. IIUC, we
> > need a home directory created without /etc/skel being copied in.
> >
> > Lfs version is CVS 20031013 (approximate) with various minor upgrades.
> > Coreutils is 5.0
> >
> > AFAICT, the '-M' is ignored, which seems a surprise to me. I would want
> > either some action or an error message.
> >
>
> A man useradd on a Mandrake 9.1 system shows a -M in the synopsis section, but
> no other explanation. Also the synopsis has a mismatched trailing ] character
> following the -M. I don't understand the " |" " " -M ]] shown.
>
> USERADD(8)
> <snip>
> SYNOPSIS
>        useradd [-c comment] [-d home_dir]
>                [-e expire_date] [-f inactive_time]
>                [-g initial_group] [-G group[,...]]
>                [-m [-k skeleton_dir] " |" " " -M ]] [-o] [-p passwd]
>                [-s shell] [-u uid] [-N] [-r]login

I guess this becomes one of those cases where we can not count on the
host's useradd. *If* it is decided that pollution from /etc/skel must be
avoided, I think maybe either:

  using the -k with /dev/null  # My preference

  -- or --

  using the minimal useradd (no -m) and then doing a mkdir, chown, chgrp
  for the lfs home directory

might be the desired solution.

-- 
NOTE: I'm on a new ISP, if I'm in your address book ...
Bill Maltby
lfsbillATearthlinkDOTnet
Fix line above & use it to mail me direct.



More information about the lfs-dev mailing list