Ubuntu 20.04 常用操作

  • 约 3 分钟
  • 727 字

用户相关

禁用密码长度限制

Ok, I will answer my question :)
I've found that pam_unix module performs password complexity check and it can be configured.
纯文本
man pam_unix:

   minlen=n
       Set a minimum password length of n characters. The default value is
       6. The maximum for DES crypt-based passwords is 8 characters.

   obscure
       Enable some extra checks on password strength. These checks are
       based on the "obscure" checks in the original shadow package. The
       behavior is similar to the pam_cracklib module, but for
       non-dictionary-based checks.
Solution: Alter the line in the pam_unix module in the /etc/pam.d/common-password file to:
纯文本
password    [success=1 default=ignore]  pam_unix.so minlen=1 sha512
It allows you to set any password with minimal length of 1.

启用 ROOT 远程访问

设置 ROOT 密码
纯文本
sudo passwd
切换 ROOT 登录
纯文本
su root
配置 SSH 远程访问 vim /etc/ssh/sshd_config
纯文本
# 关键在以下几个配置项
Port 22
ListenAddress 0.0.0.0
PermitRootLogin yes
PasswordAuthentication yes

评论栏

分享你的想法,或参与下面的讨论。

参与讨论

支持 Markdown、代码和图片

撰写评论
正在加载编辑器…

友善交流,让讨论更有价值。

更多留言

加载中…
Ubuntu 20.04 常用操作 | Jansora's AI Database