Linux commands, permissions

Source: Internet
Author: User

First, the new user natasha,uid for the 1000,gid is 555, the note information is "master":

Groupadd-g 555 Natasha

Useradd-u 1000-g 555-c Master Natasha

Modify the Natasha user's home directory to/natasha:

To view the last line of the user Information profile:

To set the password "123" for the Natasha User:

To view the last line of the user password profile:

Lock the Natasha user account:

Unlock the Natasha user account:

New group Police,gid is 999:

To view the last line of the group configuration file:

To join the Natasha user to the police group:

Modify the group name of the police group to Jingcha:

Delete Natasha users, with home directories and mailboxes deleted together:

To delete a Jingcha group:

Create the directory test in the user's home directory, enter test to create an empty file File1:

Displays file information in a long format, noting the permissions of the file and the user and group to which it belongs:

Set permissions for the file File1 so that other users can write to the file and view the settings results:

Remove the same group of users ' read permissions to the file file1 and view the results of the settings:

Set permissions for file files in numeric notation, all readable, writable, and executable, and the owning group user and other users have only read and execute permissions. To view the setup results after Setup is complete:

Change the permissions of the file file1 in numeric form so that the owner can only read the file. No other user has permission. To view the settings results:

Go back to the upper directory to see the permissions for test:

Add write permissions to this directory for other users:

Thirdly, create a new user Li by manipulating the file:

Linux commands, permissions

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.