add new HOME_MODE login.defs(5) option
This option can be used to set a separate mode for useradd(8) and newusers(8) to create the home directories with. If this option is not set, the current behavior of using UMASK or the default umask is preserved. There are many distributions that set UMASK to 077 by default just to create home directories not readable by others and use things like /etc/profile, bashrc or sudo configuration files to set a less restrictive umask. This has always resulted in bug reports because it is hard to follow as users tend to change files like bashrc and are not about setting the umask to counteract the umask set in /etc/login.defs. A recent change in sudo has also resulted in many bug reports about this. sudo now tries to respect the umask set by pam modules and on systems where pam does not set a umask, the login.defs UMASK value is used.
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
<!ENTITY FAKE_SHELL SYSTEM "login.defs.d/FAKE_SHELL.xml">
|
||||
<!ENTITY FTMP_FILE SYSTEM "login.defs.d/FTMP_FILE.xml">
|
||||
<!ENTITY GID_MAX SYSTEM "login.defs.d/GID_MAX.xml">
|
||||
<!ENTITY HOME_MODE SYSTEM "login.defs.d/HOME_MODE.xml">
|
||||
<!ENTITY HUSHLOGIN_FILE SYSTEM "login.defs.d/HUSHLOGIN_FILE.xml">
|
||||
<!ENTITY ISSUE_FILE SYSTEM "login.defs.d/ISSUE_FILE.xml">
|
||||
<!ENTITY KILLCHAR SYSTEM "login.defs.d/KILLCHAR.xml">
|
||||
@@ -185,6 +186,7 @@
|
||||
&FAKE_SHELL;
|
||||
&FTMP_FILE;
|
||||
&GID_MAX; <!-- documents also GID_MIN -->
|
||||
&HOME_MODE;
|
||||
&HUSHLOGIN_FILE;
|
||||
&ISSUE_FILE;
|
||||
&KILLCHAR;
|
||||
@@ -401,6 +403,7 @@
|
||||
ENCRYPT_METHOD
|
||||
GID_MAX GID_MIN
|
||||
MAX_MEMBERS_PER_GROUP MD5_CRYPT_ENAB
|
||||
HOME_MODE
|
||||
PASS_MAX_DAYS PASS_MIN_DAYS PASS_WARN_AGE
|
||||
<phrase condition="sha_crypt">SHA_CRYPT_MAX_ROUNDS
|
||||
SHA_CRYPT_MIN_ROUNDS</phrase>
|
||||
@@ -481,6 +484,7 @@
|
||||
<para>
|
||||
CREATE_HOME
|
||||
GID_MAX GID_MIN
|
||||
HOME_MODE
|
||||
LASTLOG_UID_MAX
|
||||
MAIL_DIR MAX_MEMBERS_PER_GROUP
|
||||
PASS_MAX_DAYS PASS_MIN_DAYS PASS_WARN_AGE
|
||||
|
||||
@@ -37,7 +37,8 @@
|
||||
</para>
|
||||
<para>
|
||||
<command>useradd</command> and <command>newusers</command> use this
|
||||
mask to set the mode of the home directory they create
|
||||
mask to set the mode of the home directory they create if
|
||||
<option>HOME_MODE</option> is not set.
|
||||
</para>
|
||||
<para condition="no_pam">
|
||||
It is also used by <command>login</command> to define users' initial
|
||||
|
||||
Reference in New Issue
Block a user