Linux知識點三

2021-10-04 05:46:03 字數 1081 閱讀 5813

1.新增乙個tom使用者,設定它屬於users組,並新增注釋資訊

分步完成:useradd tom

usermod -g users tom

usermod -c 「hr tom」 tom

一步完成:useradd -g users -c 「hr tom」 tom

2.設定tom使用者的密碼

passwd tom

3.修改tom使用者的登陸名為tomcat

usermod -l tomcat tom

4.將tomcat新增到sys和root組中

usermod -g sys,root tomcat

5.檢視tomcat的組資訊

groups tomcat

6.新增乙個jerry使用者並設定密碼

useradd jerry

passwd jerry

7.新增乙個交america的組

groupadd america

8.將jerry新增到america組中

usermod -g america jerry

9.將tomcat使用者從root組和sys組刪除

gpasswd -d tomcat root

gpasswd -d tomcat sys

10.將america組名修改為am

groupmod -n am america

1.建立a.txt和b.txt檔案,將他們設為其擁有者和所在組可寫入,但其他以外的人則不可寫入:

chmod ug+w,o-w a.txt b.txt

2.建立c.txt檔案所有人都可以寫和執行

chmod a=wx c.txt 或chmod 666 c.txt

3.將/itcast目錄下的所有檔案與子目錄皆設為任何人可讀取

chmod -r a+r /itcast

4.將/itcast目錄下的所有檔案與子目錄的擁有者設為root,使用者擁有組為users

chown -r root:users /itcast

5.將當前目錄下的所有檔案與子目錄的使用者皆設為itcast,組設為users

chown -r itcast:users *

Linux知識點(三)

2.使用者組指令 3.許可權 3.2修改檔案許可權 3.3檢視檔案大小 4.搜尋 5.程序 6.其他 備註 一般建立乙個使用者,則系統會自動生成乙個使用者組,如果該使用者如果被歸納到其他使用者組,則這個其他使用者組稱為擴充套件使用者組 cat etc passwd 使用者儲存檔案 cat etc g...

HTTP知識點 (三)

可擴充套件性的乙個重要原則 如果http的某個實現接收到了自身未定義的頭域,將自動忽略它。例如,一台http 1.1的源伺服器從使用http 1.1的proxy那兒接收到一條 的訊息,實際上源伺服器並不知道終端客戶使用的是http 1.0還是http 1.1。因此,http 1.1定義via頭域,用...

UI知識點三

id constraintwithitem id view1 attribute nslayoutattribute attr1 relatedby nslayoutrelation relation toitem id view2 attribute nslayoutattribute attr2...