当前位置:网站首页>Ansible reports an error: "MSG": "invalid/incorrect password: permission denied, please try again“
Ansible reports an error: "MSG": "invalid/incorrect password: permission denied, please try again“
2022-07-07 04:57:00 【Steve lu】
I'm doing it these days Ansible The experiment of , Make host variables , The user name and ssh password , Valid only if key pair authentication is not used
error
#Ansible The management end
[[email protected] ansible]# vim hosts
[dbservers]
192.168.109.134 ansible_port=2222 ansible_user=root ansible_password=000000
# Controlled end
[[email protected] ~]# cat /etc/ssh/sshd_config |grep Port
Port 2222
[[email protected] ansible]# ansible 192.168.109.134 -a 'date'
192.168.109.134 | UNREACHABLE! => {
"changed": false,
"msg": "Invalid/incorrect password: Permission denied, please try again.",
"unreachable": true
}
Prompt error , I'm surprised. , I thought it was a port problem , I changed it to default 22 port , It's the same mistake , The error message is said to be a password problem , I'll examine it carefully , The code is 000000 No problem , So I went online to check the problem , Got a very incredible answer , The beginning of the password is 0 You're going to report a mistake , So I went to try , Change to 123456 It was really successful .
success
#Ansible End
[[email protected] ansible]# vim hosts
[lhq]
192.168.109.134 ansible_port=2222 ansible_user=root ansible_password=123123
# Managed end
[[email protected] ~]# passwd
Change user root Password .
new password :
Invalid password : The password is less than 8 Characters
Reenter the new password :
passwd: All authentication tokens have been successfully updated .
Modified into 123123
[[email protected] ansible]# ansible lhq -a 'date'
192.168.109.134 | CHANGED | rc=0 >>
2022 year 07 month 06 Japan Wednesday 16:16:13 CST
After changing the password, it really succeeded , Is it true that the password starts with 0 Why , I'll try another password .
Other test conditions
because 131-133 I have done key pair verification before , So I'll restore the snapshot first
#Ansible The management end
[[email protected] ansible]# vim hosts
[webservers]
192.168.109.131 ansible_user=root ansible_password=000000
192.168.109.132 ansible_user=root ansible_password=012345
192.168.109.133 ansible_user=root ansible_password=123123
192.168.109.134 ansible_user=root ansible_password=101111
# Then go to each host to change the password
[[email protected] ansible]# ansible webservers -a 'date'
192.168.109.134 | CHANGED | rc=0 >>
2022 year 07 month 06 Japan Wednesday 16:55:01 CST
192.168.109.133 | CHANGED | rc=0 >>
2022 year 07 month 06 Japan Wednesday 16:55:01 CST
192.168.109.131 | UNREACHABLE! => {
"changed": false,
"msg": "Invalid/incorrect password: Permission denied, please try again.",
"unreachable": true
}
192.168.109.132 | UNREACHABLE! => {
"changed": false,
"msg": "Invalid/incorrect password: Permission denied, please try again.",
"unreachable": true
}
[[email protected] ansible]# ansible webservers -m ping -o
192.168.109.134 | SUCCESS => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "ping": "pong"}
192.168.109.133 | SUCCESS => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "ping": "pong"}
192.168.109.131 | UNREACHABLE!: Invalid/incorrect password: Permission denied, please try again.
192.168.109.132 | UNREACHABLE!: Invalid/incorrect password: Permission denied, please try again.
131 and 132 There is something wrong with the machine , Their password is 0 start
Sure enough, as the brother on the Internet said ,,0-9 In the number of, just start with 0 The host password of will cause this error , No problem with other figures .
边栏推荐
- What if the win11 screenshot key cannot be used? Solution to the failure of win11 screenshot key
- What work items do programmers hate most in their daily work?
- Common methods of list and map
- Leetcode notes
- Time complexity & space complexity
- Meaning of 'n:m' and '1:n' in database design
- R descriptive statistics and hypothesis testing
- 计数排序基础思路
- 《原动力 x 云原生正发声 降本增效大讲堂》第三讲——Kubernetes 集群利用率提升实践
- 树与图的深度优先遍历模版原理
猜你喜欢
Windows are not cheap things
3GPP信道模型路损基础知识
Introduction to the PureMVC series
Win11 control panel shortcut key win11 multiple methods to open the control panel
程序员上班摸鱼,这么玩才高端!
【736. Lisp 语法解析】
Pointer and array are input in function to realize reverse order output
A simple and beautiful regression table is produced in one line of code~
当 Knative 遇见 WebAssembly
Ansible中的inventory主机清单(预祝你我有数不尽的鲜花和浪漫)
随机推荐
What is Web3
acwing 843. n-皇后问题
一图看懂!为什么学校教了你Coding但还是不会的原因...
Two divs are on the same line, and the two divs do not wrap "recommended collection"
STM32封装ESP8266一键配置函数:实现实现AP模式和STA模式切换、服务器与客户端创建
Vscode 如何使用内置浏览器?
Lessons and thoughts of the first SQL injection
装饰器基础学习02
Common methods of list and map
Chapter 9 Yunji datacanvas was rated as 36 krypton "the hard core technology enterprise most concerned by investors"
If you ask me about R code debugging, I will tell you head, STR, help
Markdown editor
Flex layout and usage
A line of R code draws the population pyramid
Thread和Runnable创建线程的方式对比
Why do many people misunderstand technical debt
两个div在同一行,两个div不换行「建议收藏」
史上最全学习率调整策略lr_scheduler
5G VoNR+之IMS Data Channel概念
Terms used in the Web3 community