Create a Linux account manually

Source: Internet
Author: User
Tags chmod
账号与群组和/etc/passwd、/etc/shadow、/etc/group、/etc/gshadow有关

Method 1 Steps:

(1) Create the desired group: Vi/etc/group

(2) Synchronize the/etc/group with the/etc/gshadow: Grpconv

(3) Create the various attributes of the account: VI/ETC/PASSWD

(4) Synchronize the/etc/passwd with the/etc/shadow: Pwconv

(5) Establish the password for this account: passwd AccountName

(6) Building a home directory: Cp-a/etc/skel/home/accountname

(7) Change the properties of the user home directory:
Chown-r Accountname.group/home/accountname
chmod 700/home/accountname

Method 2 Steps:

(1) Create the desired group: Vi/etc/group

(2) Create the various attributes of the account: VI/ETC/PASSWD

(3) OpenSSL passwd-1-salt ' 12345678 '

(4) Vim/etc/shadow Add the encryption password created above

(5) Building a home directory: Cp-a/etc/skel/home/accountname

(6) Change the properties of the user home directory:
Chown-r Accountname.group/home/accountname
chmod 700/home/accountname

Create a Linux account manually

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.