Linux Basic Learning file Permissions (iii)

Source: Internet
Author: User

Users and user groups

Users: UID/ETC/PASSWD

Composition (username) account:passwd (x placeholder not shown): UID:GID:GECOS (optional user annotation information): Homedir (home directory): Shell (default shell)

User group: Gid/etc/group

Make group name: Password placeholder: GID: Extra Group

Shadow password

/etc/shadow user password using MD5 encryption

Compose account (login name):p asswd (encrypted password $1$SORT$MD5 encryption, other, MD5 key) (! # and * for lock not login): Password usage time: password minimum Age: Password Maximum age: password expires when: password expires before the grace period is disabled: account has a deadline

/etc/gshadow Group Password

/etc/default default properties for new users Homedir shell and other information settings


Create user useradd USERNAME Modify user password passwd USERNAME userdel Delete usermod Modify

Add Group Groupadd GROUPNAME Delete Groupdel groupmod gpasswd


Encryption method md5sum Calculating file signatures

Symmetric encryption: Encrypt and decrypt using the same password

Public Key cryptography: password pairs appear with private key secret key and public key

One-way encryption (hashed encrypted fingerprint encryption): Extract data signatures, used for data verification characteristics: avalanche effect and fixed-length output.

/MD5 128-bit fixed-length output sha1:secure Hash algorithm 160-bit fixed-length output


User Category admin: ID 0 Normal User (System user 1-499 and general user 500-60000) ID 1-65535

User Group Category Admin Group General Group (System Group general Group)

Private groups If you create a user without specifying a group to which they belong, the system automatically creates a group for it that contains only the user's name and username

Default group for basic group users

Additional groups other than the default group



Security contexts (Secure context)

File permissions: R readable can view file Contents W writable, can edit and delete x executable


Directory permissions: R can list all files within the directory W can create files on the directory x can be switched into this directory using CD


---No rights 0--x execution 001 1

-w-Write 010 2-wx Write and execute 011 3

r--Read 4 r-x Read and execute 101 5

rw-Reading and writing 6 rwx Read and write execution 111 7

permissions using 8 binary substitution 777 766 755 744

Permission modification Chown chgrp chmod umask



This article from "Day Up" blog, please be sure to keep this source http://bshark.blog.51cto.com/10309374/1896197

Linux Basic Learning file Permissions (iii)

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.