centos 7 锁定账号

锁定root账号

  # usermod -L root

解除锁定
  # usermod -U root

如何查看账户被锁定

cat /etc/shadow

被锁定账户的加密字段前面会有!或者*

原文地址:https://www.cnblogs.com/alantop/p/13779579.html