尧图网络科技YAOTU DIGITAL 获取报价
获取报价
首页 / 资讯中心 / 文章详情

echo “新密码”|passwd --stdin 用户名

发布时间:2026/9/28 22:57:57

资讯中心
01
ARTICLE

echo “新密码”|passwd --stdin 用户名

echo “新密码”|passwd --stdin 用户名
--stdinThis 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 用户名12345678910[rootrhel7 ~]# passwd --stdin rusky 为rusky用户设置密码。Changing passwordforuser rusky.zxcvbnmpasswd: all authentication tokens updated successfully.[rootrhel7 ~]# echoqwertqwert[rootrhel7 ~]# echoqwert| passwd --stdin rusky 把echo返回的字符qwert设置为用户rusky的密码Changing passwordforuser rusky.passwd: all authentication tokens updated successfully.[rootrhel7 ~]#这种方式虽然简单但是通过history命令可以查到用户的密码所以不安全。
02
RELATED NEWS

相关资讯

更多网站建设与数字化升级内容

03
WHY YAOTU

想打造同款高转化官网?

懂行业、懂生意,从建站到增长一站式陪跑

◈

场景化定制

不做模板站,围绕你的业务场景量身设计,小众不撞款。

◐

营销型架构

以转化目标组织内容与路径,让官网真正带来询盘。

▲

全周期服务

设计、开发、运营、运维一体,上线只是开始。

免费获取你的建站方案

留下需求,专属顾问 24 小时内为你输出方案建议。