首页 > 其他 > 详细

vipw 命令

时间:2021-04-20 09:13:32      阅读:16      评论:0      收藏:0      [点我收藏+]

作用:使用vipw命令可以直接编辑/etc/passwd文件

 

描述
The vipw and vigr commands edits the files /etc/passwd and /etc/group, respectively. With the -s flag, they will edit the shadow versions of those files, /etc/shadow and /etc/gshadow,
respectively. The programs will set the appropriate locks to prevent file corruption. When looking for an editor, the programs will first try the environment variable $VISUAL, then the
environment variable $EDITOR, and finally the default editor, vi(1).

 

用法:vipw [选项]

选项:

  -g, --group                   编辑 group 数据库
  -h, --help                    显示此帮助信息并推出
  -p, --passwd                  编辑 passwd 数据库
  -q, --quiet                   安静模式
  -R, --root CHROOT_DIR         chroot 到的目录
  -s, --shadow                  编辑 shadow 或 gshadow 数据库

说明

  vipw 命令允许 root 账户编辑系统的密码文件/etc/passwd。默认的编辑器是 vi ,在对 /etc/passswd 文件进行编辑时先锁定文件,编辑完成后再解锁,这样可以保证文件的一直性。vipw 命令的功能等同于 " vi /etc/passwd" 命令,但 vipw 命令的安全性更高。但我测试使用 vipw 命令修改 /etc/passwd 发现其并不能检查该文件各字段是否正确,所以还是有一定的风险。

vipw 命令

原文:https://www.cnblogs.com/my-show-time/p/14679360.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!