系統文件驗證命令pwck用法示例【每日一個知識點第190期-Linux】
pwck命令用來驗證系統認證文件/etc/passwd
和/etc/shadow
的內容和格式的完整性。
語法
pwck(選項)(參數)
選項
-q:僅報告錯誤信息;
-s:以用戶id排序文件“/etc/passwd”和“/etc/shadow”;
-r:只讀方式運行指令。
參數
- 密碼文件:指定密碼文件的路徑;
- 影子文件:指定影子文件的路徑。
實例
pwck /etc/passwd
user 'lp': directory '/var/spool/lpd' does not exist
user 'news': directory '/var/spool/news' does not exist
user 'uucp': directory '/var/spool/uucp' does not exist
user 'www-data': directory '/var/www' does not exist
user 'list': directory '/var/list' does not exist
user 'irc': directory '/var/run/ircd' does not exist
user 'gnats': directory '/var/lib/gnats' does not exist
user 'nobody': directory '/nonexistent' does not exist
user 'syslog': directory '/home/syslog' does not exist
user 'couchdb': directory '/var/lib/couchdb' does not exist
user 'speech-dispatcher': directory '/var/run/speech-dispatcher' does not exist
user 'usbmux': directory '/home/usbmux' does not exist
user 'haldaemon': directory '/var/run/hald' does not exist
user 'pulse': directory '/var/run/pulse' does not exist
user 'saned': directory '/home/saned' does not exist
user 'hplip': directory '/var/run/hplip' does not exist
pwck:無改變
《Linux學習每日一個知識點》欄目是馬哥教育Linux云計算年薪20萬+的學員社群特別發起,分享Linux工具、Linux語法、Linux項目等知識點,幫助大家快速的了解Linux學習,快速步入Linux高薪的快車道。
http://haohuigou.com/74163.html