Introduction to the/etc/default/useradd file

Source: Internet
Author: User

Introduction to the/etc/default/useradd file

First, check the content of the/etc/default/useradd file and prompt useradd default file.

# Useradd defaults file
GROUP = 100
HOME =/home
INACTIVE =-1
EXPIRE =
SHELL =/bin/bash
SKEL =/etc/skel
CREATE_MAIL_SPOOL = yes

What does each parameter value mean?
GROUP = 100 indicates the user GROUP ID
HOME =/HOME indicates the location of the HOME Directory
INACTIVE =-1 indicates whether to enable account expiration and suspension, and-1 indicates not to enable.
EXPIRE = indicates whether the account has enabled the expiration setting. None indicates that the account is not enabled.
SHELL =/bin/bash indicates the shell type used by the account
SKEL =/etc/skel indicates that the Account uses the default file content, which can be understood as the default file storage location for the added user directory. That is to say, when a user uses useradd to add a user, all the files in the user's home directory are copied from this directory.
CREATE_MAIL_SPOOL = yes indicates whether to create the email cache. yes indicates creation.

When adding a user, you need to modify the content in the/etc/skel file to add the mojo folder under the Home directory by default. The example is as follows:
[Root @ localhost ~] # Touch/etc/skel/mojo
[Root @ localhost ~] # Ll-a/etc/skel/mojo
-Rw-r -- 1 root 0 Apr 12 09:06/etc/skel/mojo
[Root @ localhost ~] # Useradd inds01
[Root @ localhost ~] # Ll/home/inds01/
Total 0
-Rw-r -- 1 inds01 inds01 0 Apr 12 09:04 mojo
[Root @ localhost ~] #

Basic Linux Tutorial:/etc/default/useradd file

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.