❶ linux鏂囦歡鏉冮檺璁劇疆鍛戒護linux鏂囦歡鏉冮檺璁劇疆
linux鏉冮檺璁劇疆錛
鎿嶄綔姝ラ/鏂規硶
1.榪涘叆linux緋葷粺錛屾寜鐩褰曚緷嬈¤繘鍏ラ渶瑕佽劇疆鏉冮檺鐨勬枃浠躲備富瑕佸懡浠わ細cd錛堝垏鎹㈢洰褰曪級ls錛堟煡鐪嬫枃浠訛級
2.璁劇疆鏂囦歡鏉冮檺鍓嶏紝鍏堟煡鐪嬫枃浠舵潈闄愩傚懡浠わ細ls-lxxx.xxx
3.鎴戜滑鍙浠ョ湅鍒版枃浠剁殑鍏蜂綋鏉冮檺錛屽垎鍒鐢╮錛寃錛寈錛-琛ㄧず瀵瑰簲鏉冮檺銆
4.姣忎竴涓鏉冮檺瀵瑰簲涓涓鐩稿圭殑緇勭粐錛屾瘮濡傛墍鏈夎咃紝緇勶紝鍏朵粬鐢ㄦ埛
5.鎺ヤ笅鏉ユ垜浠鏀瑰彉鏂囦歡鏉冮檺錛屽湪linux鍙璇籸鍙鐢4琛ㄧず錛屽彲鍐橶鍙鐢2琛ㄧず錛孹鐢1錛岄偅涔堟枃浠剁殑鏈楂樻潈闄愮瓑浜4+2+1=7錛屼袱涓ゆ垨鑰呬笁涓緇勫悎鍗沖彲璧嬩簣鏂囦歡鍏蜂綋鏉冮檺錛屽懡浠わ細chmod664XXX.XXX
6.璧嬩簣瀹屾垚鎴戜滑鍙鍒╃敤鍛戒護鍐嶆℃煡鐪嬫枃浠舵潈闄愶紝鏁板兼槸鍚﹁窡鎴戜滑璁懼畾鐨勪竴鑷淬
linux濡備綍緇欐枃浠跺炲姞鍐欏叆鏉冮檺錛
絳旀柟娉曞備笅錛
1銆佺櫥褰昄inux緋葷粺錛屾柊寤轟竴涓緇堢
2銆佸湪緇堢涓浣跨敤touch鍛戒護鍒涘緩涓涓鏂囦歡
3銆佷嬌鐢╒im緙栬緫鍣錛屽湪鏂囦歡涓鍐欑偣鍐呭癸紝杈撳叆:wq淇濆瓨閫鍑
4銆佽繑鍥炲埌緇堢涓錛屼嬌鐢╨s-l鏌ョ湅鏂囦歡鏉冮檺
5銆佷嬌鐢╟hmod鍛戒護浠ュ強+x鍙傛暟緇欐枃浠跺彲鎵ц屾潈闄
榪欓噷鐨剎琛ㄧず鍙鎵ц屾潈闄愶紙璇匯佸啓銆佸彲鎵ц屼笁縐嶆潈闄愬垎鍒鏄鐢╮銆亀銆亁鏉ヨ〃紺猴級錛涜岄偅涓猘琛ㄧずall錛屽氨鏄鐢ㄦ埛銆佺敤鎴風粍鍜屽叾浠栫敤鎴蜂笁縐嶈韓浠界殑鏉冮檺鍊奸兘榪涜屼慨鏀癸紙濡傛灉鍙淇鏀圭敤鎴鋒潈闄愶紙user錛夈佺敤鎴風粍鏉冮檺錛坓roup錛夈佸叾浠栫敤鎴鳳紙others錛変笁縐嶈韓浠藉叾涓鐨勪竴縐嶏紝鍙浠ョ敤u銆乬鎴杘鏉ヤ唬鏇塊偅涓瀛楁瘝a錛夛紱x鍓嶉潰鐨勫姞鍙瘋〃紺烘坊鍔犳潈闄愶紙濡傛灉鏄鍘繪帀鏌愪釜鏉冮檺灝辨槸鑻辨枃鍑忓彿錛夈
?
鍦ㄤ嬌鐢╨s-l鍛戒護鏌ョ湅鏂囦歡鏉冮檺灞炴у氨鏈変簡鍙鎵ц屾潈闄愶紝鍙浠ヤ嬌鐢ㄦ枃浠剁殑緇濆硅礬寰勬潵榪愯屽畠
linux涓嬶紝濡備綍淇鏀逛竴涓鏂囦歡鐨勬潈闄(鍛戒護)錛
鐢╝cl錛宎ccesscontrollist銆
涓嶈繃鍗拌薄閲岄渶瑕佷慨鏀圭佺洏鐨勬寕杞藉弬鏁幫紝鎵撳紑acl鏀鎸併
璁劇疆acl鐢ㄥ懡浠setfacl錛岃幏鍙栨潈闄愮敤getfacl銆
娉ㄦ剰蹇呴』鍐呮牳閲岄潰鎵撳紑浜嗕綘鐨勭‖鐩樺垎鍖虹被鍨嬮┍鍔ㄧ殑acl鏀鎸佹墠鑳藉惎鍔ㄥ垎鍖哄埌acl鍔熻兘銆傚傛灉浣犵殑緋葷粺鏄嫻佽岀殑澶у瀷鍙戣岀増錛岃屼笖娌℃湁鑷宸辯紪璇戝唴鏍搞傞偅涔堝簲璇ユ槸榛樿ゆ敮鎸佷簡錛屼慨鏀規寕杞藉弬鏁板悗灝卞彲浠ョ敤浜嗐
娉ㄦ剰鍟婏紒鍒嗗尯綾誨瀷鐨勯┍鍔ㄨ佹敮鎸乤cl鎵嶅彲浠ワ紒fatntfs椹卞姩閮戒笉鏀鎸乤cl鑰屼笖娌℃湁琛ヤ竵娌℃湁鎻掍歡銆傚緩璁浣跨敤ext3/4銆乺eiserfs鏉ユ敮鎸乤cl銆
錛堝彲鑳絥tfs-3g鏀鎸侊紝浣嗘垜娌¤佸埌榪囩浉鍏崇殑淇℃伅銆傦級銆
kalilinux褰撲腑鎬庝箞璁劇疆鐢ㄦ埛鏂囦歡鏉冮檺綆$悊錛
鍙浠ラ氳繃鍛戒護chmod鏉ヨ劇疆鐢ㄦ埛鏂囦歡鏉冮檺綆$悊銆
root鏉冮檺鎬庝箞寮鍚痩inux錛
linux榪涘叆root鏉冮檺鐨勬柟娉曪細棣栧厛浣跨敤鈥淐trl+Alt+T鈥濇墦寮緇堢錛屾墽琛屸渟udopasswdroot鈥濆懡浠わ紱鐒跺悗杈撳叆鐢ㄦ埛瀵嗙爜錛岃劇疆root瀵嗙爜錛涙渶鍚庢墽琛屸渟u鈥濆懡浠わ紝杈撳叆鍒氬垰璁劇疆鐨剅oot瀵嗙爜鍗沖彲銆
棣栧厛鎵撳紑緇堢錛圕trl+Alt+T錛
鍦ㄨ繖閲岃В閲婁竴涓媌wj@ubuntu:~$榪欏彞璇濈殑鍚涔夛細
bwj鏄鐢ㄦ埛鍚嶏紝涔熷氨鏄浣犺嚜宸辮搗鐨勫悕瀛椼
@鏄鍒嗗壊鐨勭﹀彿ubuntu鏄涓繪満鍚嶏紝涔熷氨鏄浣犳墍浣跨敤鐨勬満鍣ㄧ殑鍚嶇О~鏄褰撳墠鐩褰曪紝
~琛ㄧず鏍圭洰褰
$鏄鎻愮ず絎︼紝褰撹繘鍏root鏃訛紝浼氬彉鎴#杈撳叆sudopasswdroot錛堟敞鎰弍asswd鐨勬嫾鍐欙級錛屽啀杈撳叆鐢ㄦ埛瀵嗙爜錛屾帴涓嬫潵浼氳╀綘璁劇疆root瀵嗙爜錛屽苟鍐嶆$『璁ゃ
鎺ヤ笅鏉ヨ緭鍏su錛屽啀杈撳叆鍒氬垰璁劇疆鐨剅oot瀵嗙爜灝卞彲浠ヨ繘鍏root浜嗐
涔嬪悗鎯寵侀鍑鴻緭鍏exit鍗沖彲銆