当前位置:网站首页>echo “新密码”|passwd --stdin 用户名
echo “新密码”|passwd --stdin 用户名
2022-04-22 09:12:00 【larance】
-stdin
This option is used to indicate that passwd should read the new password from standard input, which can be a pipe.
这个选项用于从标准输入管道读入新的密码。
使用 echo 方式来重置Linux 系统用户密码:
echo “新密码”|passwd --stdin 用户名
[root@rhel7 ~]# passwd --stdin rusky 为rusky用户设置密码。
Changing password for user rusky.
zxcvbnm
passwd: all authentication tokens updated successfully.
[root@rhel7 ~]# echo "qwert"
qwert
[root@rhel7 ~]# echo "qwert" | passwd --stdin rusky 把echo返回的字符qwert设置为用户rusky的密码
Changing password for user rusky.
passwd: all authentication tokens updated successfully.
[root@rhel7 ~]#
这种方式虽然简单,但是通过history命令可以查到用户的密码,所以不安全。
版权声明
本文为[larance]所创,转载请带上原文链接,感谢
https://blog.csdn.net/mybluesky1983/article/details/124281668
边栏推荐
- pytorch模型加载跑测试集和训练过程中跑测试集结果不一致的问题?
- 回文链表(链表复制到数组、快慢指针+反转链表)
- MySQL uses the source command to import SQL. There is an error. I think it should be a coding problem. I don't know how to solve it
- pip install shutil 报错
- C bit starts the public beta
- 2022g3 boiler water treatment certificate title and answer
- L2-004 search tree judgment
- 学习RHCSA的第一天
- 手动搭建hyperledger fabric v2.x 生产网络(四)创建通道,链码的生命周期
- I/O知识点总结
猜你喜欢

【dpdk】10.dpdk-dns学习笔记

宝宝起名神器小程序源码_支持多种流量主模式

Eventbridge integrated cloud service practice

在线CSV转YAML工具

MySQL on duplicate key update / case when syntax

Breakthroughs and new development opportunities of smart watches

如何解决项目文档管理中的复杂性?

HSV颜色空间中颜色(红、黄、绿、 青、蓝、紫、 粉红、 砖红、 品红)对应的灰度范围

使用docker搭建适合thinkphp5的lnmp+redis开发环境

1958年高考数学真题
随机推荐
Construire manuellement le tissu hyperledger V2. X réseau de production (IV) Création de canaux, cycle de vie des codes de chaîne
MySQL-高级-5 存储引擎
A 2500 word article will take you to understand the basic knowledge of performance testing
How to add mailbox email in MySQL data table
Cmake uses the basic grammar of basic knowledge I
云数引领下,桑达股份2021年营收427.04亿元,同比增长33.21%
找出二维数组最大的一个数
MySQL on duplicate key update / case when syntax
numpy笔记(vstack,random.permutation,empty_like,empty,diff,random.choice,random.randint,isin)
2022 R1 quick opening pressure vessel operation exercises and online simulation examination
泳道跨域问题
hyperscan --- 2 编译
New dynamic video wallpaper wechat applet source code_ Support multiple categories of short videos - there are also static wallpapers
基于麒麟SP10服务器版的Kubernetes集群安装
智能手表的突破和新发展机遇
R语言进阶|广义向量和属性解析
Intersecting linked list (set, double pointer)
知识点的5W
Open3D点云处理
C bit starts the public beta