Linux Basics Command Practice Day2

Source: Internet
Author: User

Job One:

1) New user Natasha,uid is 1000,gid to 555, note information is "master"

2) Modify Natasha user's home directory for/natasha

3) View the last line of the user Information profile

4) Set the password "123" for the Natasha user

5) View the last line of the user's password profile

6) Lock The Natasha user account

7) Unlock The Natasha user account

8) New group Police,gid to 999

9) View the last line of the group configuration file

Add Natasha users to the Police group

One) modify The group name of the police group to Jingcha

Delete Natasha users, with home directories and mailboxes deleted together

Delete Jingcha Group

Job Two:

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

2) display file information in long format, note the permissions of the file and the user and group to which it belongs

3) Set permissions for file file1 so that other users can write to this file.

4) View the setting results,

5) Remove the Read permission from the same group of users to the file file1 and view the setting results.

6) use digital notation to set permissions for file files , all readable, writable, and executable, and the owning group user and other users have only read and execute permissions. Review the setup results when the settings are complete.

7) Change the permissions of the file File1 in digital form so that the owner can only read the file. No other user has permission. View the settings results.

8) go back to the upper directory to see the test permissions

9) Add Write permissions to this directory for other users

Job Three:

Create a new user by manipulating the file Alex

Job Four:

1) Create a new directory/test/dir, the owner is Tom, the array for the Group1,/test directory has permission of 777

2) New user jack, switch to the jack user, verify the jack user rwx permissions to the dir directory (open another terminal, and then modify the Dir directory's others permissions)

3) Add Jack to the group1 group to verify the Jack User's rwx permissions to the dir directory (open another terminal, and then modify the group permissions of the Dir directory)

4) switch to Tom User, verify the RWX permission of Tom user to dir directory (open another terminal, modify the user permission of Dir directory in turn)

5) Create a new file in Dir directory Tom.txt, the owner is Tom, the group is the Group1,/test directory permissions of 777

6) New user rose, switch to Rose User, verify the Rose User's rwx permissions to Tom.txt (open another terminal, modify tom.txt others permissions to match the verification process)

7) Add rose to the group1 group and, under the Rose user, verify the rwx permissions of the rose user to Tom.txt (open another terminal and modify Tom.txt group1 permissions to match the verification process)

8) switch to Tom user and verify the rwx of Tom User to Tom.txt Permissions (open another terminal, modify the user permissions of Tom.txt to match the validation process)

Resources

1. Http://www.cnblogs.com/linhaifeng/articles/6045600.html#_label6

2. http://www.linuxidc.com/Linux/2016-03/129089p4.htm

3. http://cn.linux.vbird.org/linux_basic/0410accountmanager.php#account_id

Linux Basics Command Practice Day2

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.