Check Linux default Access control permissions

Source: Internet
Author: User
Tags chmod mail

  Experimental purposes: Understanding the Linux file format with permissions settings

  Experiment steps:   1. Log in as root into Linux   2. Create a new account with the following command Anyuser/usr/sbin/useradd anyuser   3. Set for Anyuser account Password:  /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 &nbs   P Bin:x:1:1:bin:/bin   Daemon:x:2:2:daemon:/sbin:   mail:x:8:12:mail:/var/spool/mail   NAMED:X "25:25:Bi nd 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. Log off and log in as root   7. Enter the following command:/bin/chmod o-r/etc/  chmod is an order to make a fortune in a file or directory under Linux, for detailed We will introduce it in the operating system Security section.   8Re-log on again with the Anyuser account, trying to list everything under/etc/  9. The command should fail   10 as the system no longer allows everyone to access. 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:al L 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.