How to create automatic profiles

Adrian Ho lexfiend at usa.net
Fri Jun 8 19:17:54 PDT 2001


On Fri, 8 Jun 2001, Stephen Bosch wrote:

> Adrian Ho wrote:
> > There's a reason it's not in the default login.defs, BTW...
>
> I wasn't making a value statement. Somebody wanted to know how to
> change the default behaviour.

Which isn't recognized in the useradd that comes with stock shadow-utils,
as I said.  (Actually, it is, but...well, read on.)

> > > You can add a parameter to /etc/login.defs like so:
> > >
> > > CREATE_HOME   yes
> > >
> > > I could be wrong but I think this is a generic option.
> >
> > Nope, it's a RedHat-ism.  Stock useradd actually spits out a message
> > suggesting '-m' instead.  8-)
>
> RedHat-ism? How so? Just because RedHat installs have CREATE_HOME in
> their /etc/login.defs? Or is the RedHat "useradd" patched to support
> this parameter?

Exactly.  From useradd.c in stock shadow-20001016:

[...]
    } else if (getdef_str("CREATE_HOME")) {
        /*
         * RedHat added the CREATE_HOME option in login.defs in their
         * version of shadow-utils (which makes -m the default, with
         * new -M option to turn it off).  Unfortunately, this
         * changes the way useradd works (it can be run by scripts
         * expecting some standard behaviour), compared to other
         * Unices and other Linux distributions, and also adds a lot
         * of confusion :-(.
         * So we now recognize CREATE_HOME and give a warning here
         * (better than "configuration error ... notify administrator"
         * errors in every program that reads /etc/login.defs).  -MM
         */
        fprintf(stderr,
    _("%s: warning: CREATE_HOME not supported, please use -m instead.\n"),
            Prog);
    }
[...]

-- 
Adrian Ho   lexfiend at usa.net

-- 
Unsubscribe: send email to lfs-apps-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message



More information about the blfs-support mailing list