系统文件验证命令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高薪的快车道。

【超全整理】《Linux云计算从入门到精通》linux学习入门教程系列实战笔记全放送

相关新闻

联系我们

400-080-6560

在线咨询:点击这里给我发消息

邮件:work@magedu.com

工作时间:周一至周日,09:00-18:30

QR code