sudoers.d 中的 README 文件是什麼類型的文件?

sudoers.d 中的 README 文件是什麼類型的文件?

只是好奇...認為這將是一個很好的文件,可以用我所有的管理權限來閱讀,而不是...哈哈。由於 Ubuntu 無法辨識檔案類型,因此無法開啟。

別擔心,我不會改變它,我保證

答案1

「打不開」?你想如何打開它?以下是我在系統上使用的一些命令:

w3@aardvark:~(0)$ ls -l /etc/sudoers.d
total 8
-r--r----- 1 root root 1626 Dec 28  2013 IPCop
-r--r----- 1 root root  958 Feb 10  2014 README
w3@aardvark:~(0)$ sudo file /etc/sudoers.d/README
[sudo] password for w3: 
/etc/sudoers.d/README: ASCII text
w3@aardvark:~(0)$ sudo cat /etc/sudoers.d/README
#
# As of Debian version 1.7.2p1-1, the default /etc/sudoers file created on
# installation of the package now includes the directive:
# 
#   #includedir /etc/sudoers.d
# 
# This will cause sudo to read and parse any files in the /etc/sudoers.d 
# directory that do not end in '~' or contain a '.' character.
# 
# Note that there must be at least one file in the sudoers.d directory (this
# one will do), and all files in this directory should be mode 0440.
# 
# Note also, that because sudoers contents can vary widely, no attempt is 
# made to add this directive to existing sudoers files on upgrade.  Feel free
# to add the above directive to the end of your /etc/sudoers file to enable 
# this functionality for existing installations if you wish!
#
# Finally, please note that using the visudo command is the recommended way
# to update sudoers content, since it protects against many failure modes.
# See the man page for visudo for more information.
#
w3@aardvark:~(0)$ sudo mimetype /etc/sudoers.d/README
/etc/sudoers.d/README: text/x-readme

答案2

這是一個簡單的純文字檔案。您可以透過運行來閱讀它

sudo less /etc/sudoers.d/README

這個檔案對於系統的功能來說並不是那麼重要,所以如果你編輯它也沒什麼大不了的。

相關內容