Skip to Content
VMWARE錦囊妙計第二版
book

VMWARE錦囊妙計第二版

by Ryan Troy, Matthew Helmke
April 2013
Beginner to intermediate
368 pages
6h 45m
Chinese
GoTop Information, Inc.
Content preview from VMWARE錦囊妙計第二版
一般安全性(General Security
|
235
6.15 使用 sudo
問題
僅適用於 ESXi 3.5/4.x 您有許多使用者於您的伺服器上作業,您希望去追蹤一些活動
資訊。
解決方案
使用
sudo
,您可以安全且有效率的提供使用者執行某些預先定義的 root 命令,並且有
著完整的稽核追蹤。
討論
sudo
命令允許使用者執行在
/etc/sudoers
文件中指定的命令,使用這個機制,您可以允
許正常的非
root
使用者去執行必要的命令,以管理您的 ESX 伺服器,無需給他們直接
或是完整的
root
存取權限。
執行一個受限的命令或者試圖執行任何僅限於
root
使用者才能執行的任何動作,授權使
用者必須將
sudo
置於命令之前。使用者第一次使用這個命令會被要求輸入他的使用者
的密碼,在預設的情況,如果他 / 她在逾時五分鐘後嘗試執行另外一個受限程式,
sudo
將再次自動詢問使用者的密碼。您可以加入變數到
/etc/sudoers
文件,以修改這個設定
(其中
XX
數值代表分鐘):
timestamp_timeout
XX
預設 ESX 伺服器將使用
syslog
以維護
sudo
的日誌,您可以透過這個檔案去追蹤使用
者,所有成功或是失敗的
sudo
命令嘗試都會被記錄於此。然而,如果您希望這些訊
息儲存到別的地方,您可以在
sudo
配置文件下指定一個日誌儲存位置,透過編輯
/etc/
sudoers
文件,加入這一行:
Default logfile=/var/log/sudo.log
使用
sudo
之前,您需要配置
/etc/sudoers ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

精實企業|高績效組織如何達成創新規模化

精實企業|高績效組織如何達成創新規模化

Jez Humble, Joanne Molesky, Barry O'Reilly
深度學習|內行人的做法

深度學習|內行人的做法

Josh Patterson, Adam Gibson

Publisher Resources

ISBN: 9789862767443