Linux User Creation and permission-related operation demonstration, linux operation demonstration

Source: Internet
Author: User

Linux User Creation and permission-related operation demonstration, linux operation demonstration
Basic command operations

The procedure is as follows:

Groupadd testgroupuseradd-d/usr/test-g testgroup-m testuserpasswd testuser # query user group # groups cpic # delete user # userdel cpic
Questions

The password is too short to be modified

How to change the user password in CentOS

Problem:

Invalid password: too short

Invalid password: Too simple

Invalid password: it is based on dictionary words

Solution:

1. Common users

A. Obtain the root permission of a Super User

Command: su, su-, or su-root

B. passwd User Name

2. superuser

A. Open the system-auth file.

Command: vi/etc/pam. d/system-auth

B. modify one line (set the minimum password length to 4 ):

Password requisite pam_cracklib.so try_first_pass retry = 3 type = minlen = 4

C. passwd Super User Name

Unable to obtain permissions for some Directories

Because directory B has the permission to drwxr-xr-

There are two solutions for each layer of directories:

1) make user1 the owner of the Directory

2) The directory owner is still root, but the permission is changed to xxx r-x, so that non-root users can access and read.

Reference

[1]. How to change the user password in CentOS?

[2]. In linux, you can only Log On As A guest user. you can log on as a root user or as a non-root user.

[3]. Directory Access Permissions for common users in Linux

[4] viewing all users and all user groups in Linux

Related Article

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.