查閱Linux缺省的存取控制權限具體步驟
發(fā)布日期:2022-03-25 10:07 | 文章來源:源碼中國
實驗目的:了解Linux文件格式以權限的設置
實驗步驟:
1.以root身份登錄進入linux
2.使用以下命令創(chuàng)建新帳戶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密碼文件內(nèi)容:/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下用來發(fā)跡文件或目錄權限的命令,有關其詳細的內(nèi)容我們會在操作系統(tǒng)安全篇里介紹.
8.再次以anyuser帳戶重新登錄,試著列出/etc/下所有內(nèi)容
9.由于系統(tǒng)不再允許Everyone的訪問,命令應該失敗
10.作為非root用戶,可以使用以下命令發(fā)跡密碼:
host$ passwd
(current) UNIX password:
New UNIX password:
Retype new UNIX password:
Passwd:all authentication tokens updated successfully
實驗步驟:
1.以root身份登錄進入linux
2.使用以下命令創(chuàng)建新帳戶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密碼文件內(nèi)容:/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下用來發(fā)跡文件或目錄權限的命令,有關其詳細的內(nèi)容我們會在操作系統(tǒng)安全篇里介紹.
8.再次以anyuser帳戶重新登錄,試著列出/etc/下所有內(nèi)容
9.由于系統(tǒng)不再允許Everyone的訪問,命令應該失敗
10.作為非root用戶,可以使用以下命令發(fā)跡密碼:
host$ passwd
(current) UNIX password:
New UNIX password:
Retype new UNIX password:
Passwd:all authentication tokens updated successfully
版權聲明:本站文章來源標注為YINGSOO的內(nèi)容版權均為本站所有,歡迎引用、轉(zhuǎn)載,請保持原文完整并注明來源及原文鏈接。禁止復制或仿造本網(wǎng)站,禁止在非www.sddonglingsh.com所屬的服務器上建立鏡像,否則將依法追究法律責任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學習參考,不代表本站立場,如有內(nèi)容涉嫌侵權,請聯(lián)系alex-e#qq.com處理。
相關文章