查閱Linux預設的存取控制許可權

來源:互聯網
上載者:User

   實驗目的:瞭解Linux檔案格式以許可權的設定

   實驗步驟:   1.以root身份登入進入linux   2.使用以下命令建立新帳戶anyuser/usr/sbin/useradd anyuser   3.為anyuser帳戶設定密碼:   /usr/sbin/passwd   Changing password for user anyuser   New UN IX password   Retype UNIX password   4.登出並且以anyuser帳戶登入   5.查看linux密碼檔案內容:/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.登出並且以root身份登入   7.輸入以下命令:/bin/chmod o-r/etc/   chmod是在Linux下用來發跡檔案或目錄許可權的命令,有關其詳細的內容我們會在作業系統安全篇裡介紹.   8.再次以anyuser帳戶重新登入,試著列出/etc/下所有內容   9.由於系統不再允許Everyone的訪問,命令應該失敗   10.作為非root使用者,可以使用以下命令發跡密碼:   host$ passwd   (current) UNIX password:   New UNIX password:   Retype new UNIX password:   Passwd:all authentication tokens updated successfully 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.