【正文】
Γ В Γ В Γ В Γ В ?Authorization in Linux based on file permissions ? Exception: root is allowed to do everything ?Once logged in, users cannot change their identity ? except through a SUID program, which allows them to run a mand as someone else (most often root) Γ В ?user ?user id ?group ?group id ?cat /etc/passwd | shadow ?cat /etc/groups Γ В ? [lindenlocalhost ~]$ ll total 0 rwrwr 1 linden linden 0 20231210 20:28 ?d | l | b | c ?r ?w ?x | s Γ В Perm File Directory ? R read list ? W change change content ? X execute can ?cd? ? SUID Program runs with effective N/A user ID of owner ? SGID Program runs with effective Files created in dir inherit GID of owner the same GID as the dir ? Stickybit N/A Only the owner of the file and the owner of the dir may delete files in this dir Γ В ?ls l ?chmod Setting file permissions ?chown change file owner and group ?chgrp change group ownership ?umask Γ В ?有時,沒有被授權(quán)的用戶需要完成某項任務。 2023, 10 Γ В ?用戶與文件 ↓ ?從 POST到 sh ↓ Γ В ?認證、授權(quán) Authentication、Authorization ?PAM Pluggable Authentication Modules ?SUID ?Permission ?setuid etc Γ В ?認證 /鑒別 Authentication ?誰是誰 ?授權(quán) Authorization ?能干什么 ?鑒別手段 ?基于口令 /令牌 /卡 /指紋 /聲音等信息 ?授權(quán)方法 ?訪問控制矩陣 ACL/ACM Γ В ?傳統(tǒng)的 AA ?應用程序自己管理 ?PAM ?標準庫 ?PAM in Linux Γ В ? PAM was first proposed by Sun Microsystems in an Open Software Foundation Request for Comments (RFC) dated October 1995. It was adopted as the authentication framework of the Common Desktop Environment. ? As a standalone infrastructure, PAM first appeared from an opensource, LinuxPAM, development in Red Hat Linux in August 1996. ? PAM is currently supported in the AIX operating system, DragonFly BSD, FreeBSD, HPUX, Linux, Mac OS X, NetBSD and Solaris. ? PAM was later standardized as part of the X/Open UNIX standardization process, resulting in the X/Open Single Signon (XSSO) standard. Γ В ?Every application required its own sec