Check the Linux default Access control permissions specific steps

Source: Internet
Author: User
Tags chmod mail

Experimental Purpose: To understand the Linux file format with permission settings

Experiment steps:

1. Log in as root into Linux

2. Create a new account using the following command Anyuser/usr/sbin/useradd Anyuser

3. Set password for Anyuser account:

/usr/sbin/passwd

Changing password for user anyuser

New UN IX Password

Retype UNIX Password

4. Log off and login with Anyuser account

5. View the contents of the Linux password file:/bin/cat/etc/passwd

Root:x:0:0:root:/bin/bash

Bin:x:1:1:bin:/bin

Daemon:x:2:2:daemon:/sbin:

Mail:x:8:12:mail:/var/spool/mail

Named:x "25:25:bind user:/var/named:

Dnscache:x:410:405:dnscache User:/var/djbdns:/bin/true

Xfs:x:414:414:x Font Server:/etc/s11/fs:/bin/false

Postfix:x:415:416:postfix:/var/spool/postrix:

Mtsql:x:416:417mysql Server:/var/lib/mysql:/bin/bash

Test:x:501:501:condor:/home/condor:/bin/bash

Anyuser:x:502:506:zhengya:/home/julia:/bin/bash

6. Logout and log in as root

7. Enter the following command:/bin/chmod o-r/etc/

chmod is the command to make a file or directory permission under Linux, and we'll introduce it in the operating system Security section for details.

8. Re-log on again with the Anyuser account, trying to list all the content under/etc/

9. Because the system no longer allows everyone access, the command should fail

10. As a non-root user, you can use the following command to make your fortune password:

host$ passwd

(current) UNIX Password:

New UNIX Password:

Retype new UNIX Password:

Passwd:all Authentication Tokens updated successfully

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.