Home Aws Ubuntu系统下允许密码登录
Post
Cancel

Aws Ubuntu系统下允许密码登录

refer to:
https://unix.stackexchange.com/questions/37633/can-a-linux-user-change-their-password-without-knowing-the-current-password

1. 设置ubuntu的密码

sudo passwd ubuntu

2. sudo vim /etc/pam.d

保证这一句没有被注释掉

auth [success=1 default=ignore] pam_unix.so nullok

3. sudo vim /etc/ssh/sshd_config

保证这一行存在:

PasswordAuthentication yes

如果修改了ssh服务的话,重启: sudo service ssh restart

就可以了。

This post is licensed under CC BY 4.0 by the author.