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錦囊妙計第二版
236
|
第六章
sudoers
文件中的群組,必須對應到您的
/etc/group
內的群組,舉例來說,
admin
群組使用
%admin
來代表。
如果您有多個使用者在同一行內,請用逗號分隔。
命令也可以使用逗號分隔,請記得空格也會被視為命令的一部分。
您可以使用單字
ALL
去表示該行會套用到群組、使用者名稱、命令或者伺服器,這
取決於您把這單字插入的地方。
透過使用
NOPASSWD
值,您可以允許繞過使用者輸入他們的密碼(這個選項是不建議
使用的)。
藉由使用反斜線(
\
)在行列的末段,您可以換到新的一行而不會破壞語法。
另見
訣竅 6.16
6.16 配置 sudo
問題
僅適用於 ESXi 3.5/4.x 現在您已經啟用
sudo
了,您希望根據自己的喜好配置它。
解決方案
編輯
/etc/sudoers
文件。
討論
使用
sudo
的益處很多,當您取得標準環境後,加入新使用者、命令或是群組都會變成
非常快速,然而在一開始設置時,您可能需要花一些時間去練習分配工作命令的權限給
使用者。
假設我們希望將允許存取所有
root
命令的權限給予一組使用者,我們可以下這樣的命令
達到這一點:
ryan, matthew ALL=(ALL) ALL
不過
sudo
真正的美麗之處在於它的精細度(Granular)能力,它能讓使用者在 ESX
服器上的特定位置存取執行某些特定的命令。例如,我們想要給予
ryan
matthew
有能
225
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