Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 850 - useradd does not support CREATE_HOME
Summary: useradd does not support CREATE_HOME
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Tod M. Neidt (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-25 19:08 UTC by Spider
Modified: 2003-02-04 19:42 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Spider 2002-02-25 19:08:00 UTC
Darkmere skel # useradd my    
useradd: warning: CREATE_HOME not supported, please use -m instead.

this makes the default skeleton unapplyable, useradd again will only bark that
the user already exists.
Comment 1 Tod M. Neidt (RETIRED) gentoo-dev 2002-02-26 01:07:34 UTC
Hi!

This error message is generated because we have "CREATE_HOME   yes" in
/etc/login.defs

Unfortunately (or fortunately, depending on your perspective), CREATE_HOME is
not supported by the stock shadow package. 

From shadow-4.0.1/src/useradd.c

*******snip*************
        if (mflg) {
		create_home ();
		copy_tree (def_template, user_home, user_id, user_gid);
	} 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);

*******end snip*******************

I will defer to the author of the shadow package (unless told otherwise by
drobbins) and set 'CREATE_HOME   no' in login.defs


Thanks for the bug report.