linux 禁用用户_如何有效禁用Linux用户帐户?

linux 禁用用户

Not yet to totally delete the Linux user account, but how to effectively disable a Linux user account?

尚未完全删除Linux用户帐户,但是如何有效地禁用Linux用户帐户?

That is, disable a user account while keep all its files/configurations. Later, if it is needed, so that I can enable it again.

即,禁用用户帐户,同时保留其所有文件 /配置。 以后,如果需要的话,我可以再次启用它。

To effectively disable a Linux user account so that it can’t login using its password or keys, you can use the usermod tool:

要有效地禁用Linux用户帐户,使其无法使用其密码或密钥登录,可以使用usermod工具

Lock a Linux user zma2:

锁定Linux用户zma2

# usermod -e 0000-00-00 -L zma2

Unlock the user locked by the above one:

解锁被以上锁定的用户:

# usermod -e "" -U zma2

The -L/-U options lock/unlock the user’s password and -e set/clear the expiration dates so that the user can/cannot login using other ways than the password.

-L / -U选项锁定/解锁用户密码,并-e设置/清除到期日期,以便用户可以/不能使用密码以外的其他方式登录。

Answered by Eric Z Ma.
埃里克·马(Eric Z Ma)回答。

翻译自: https://www.systutorials.com/how-to-effectively-disable-a-linux-user-account/

linux 禁用用户

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值